Forums

Multiple e-mail template

shah.sphere 23 May, 2013
My form have a combo box input, which consists a pair of drop down and text box input. Everything is working fine. The only problem is about the e-mail template.

As for the combo part, when it comes to the field that user don't need to fill in, then the e-mail template will appear their dynamic name for example:

Group: {group}

Is there any way to make it automatically hidden in the e-mail template, if user didn't fill in the unrequired field?

Thank u!
GreyHead 23 May, 2013
Hi shah.sphere,

There are a few ways to handle this:

1) Use a ghost input, ChronoForms adds these by default. This will hide the {group} bit but not the label.

2) Set Replace Ghosts to Yes in the Email action. This will also hide the {group} part only.

3) Use the same name for both parts of the combo box and disable the 'other' box when not in use so that it doesn't return a value.

4) Use a custom code action before the email to build a new form parameter that is either '' empty or includes both label and value.

Bob
shah.sphere 27 May, 2013
Alrite... Thanks for your help. I think i'm going to use the second choice which is replacing the nulls... By the way, is possible to make it set to default value like -?

For example, it will become like this:
Group: -

instead of:
Group:
GreyHead 27 May, 2013
Hi shah.sphere,

You can set a default value for the field (but that might have other side effects - like breaking the 'required' validation). Otherwise it would mean adding some Custom Code to add the values after the form is submitted.

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