Forums

Empty radio button or checkbox showing code in emails.

Grizzled 18 Feb, 2014
Hello,

We are running an older version of everything and are in the process of upgrading.

But I have a form question. If a customer fills out the form and doesn't select a checkbox or radio button (not all are required on the form.

The email that get sents to the customer shows...
Flowers:
{flowers}

We do have a text box that is not required for a Secondary Name. And in the email it says Secondary Name but there are no curly brackets.

We like to have it so that if the form field is blank the curly brackets and code are not in the email. Is that easy to do?

Thanks!
GreyHead 19 Feb, 2014
Hi Grizzled,

From what I remember in CFv3 you need to handle this manually - have some Before Email PHP that check for missing values for radio buttons and checkbox groups and replaces them with 'empty' entries.

In CFv4 there are 'Ghost' options for these elements that make sure that a default value is set if nothing is included; and there's also an option in the Show HTML action to replace all {xxx} strings.

Bob
This topic is locked and no more replies can be posted.