Forums

Removing a {variable_name} from email template

pscarnegie 24 May, 2010
Is there a way to not display a variable name in an email template if that variable is left null?

Currently, only the text entry boxes will display as blank (if left null) however the radio buttons and check boxes will display the variable name if left blank, ie {variable_name}. Do I need to run a PHP Script from within the email form to strip those elements out, and if so, any suggestions as to how that might look?

Also, I've noticed that even though the email is formatted as HTML, and that there are basic styles applied to the email using CSS style tags, when the email is delivered, non of the styles are applied. It looks great from within the ChronoForms administration area, but not in the inbox.
GreyHead 24 May, 2010
Hi pscarnegie,

You can add PHP to the OnSubmit Before box to make sure that the variable is present in the $_POST array. I posted some code yesterday in a thread about validation that would do this.

Bob
pscarnegie 24 May, 2010
Could you please provide either a link or the title of that posting.
This topic is locked and no more replies can be posted.