1. Home
  2. Docs
  3. FAQ
  4. Can I use conditional logic in the email message?

Can I use conditional logic in the email message?

Yes, you can use conditional tags in the email as well. They look a little different from the ones used in the form; [my-group-name] ... [/my-group-name]. Any content you put between these tags will only be visible if the corresponding group was visible during submission of the form.


Let’s say you have a form with a drop-down field that reveals a group, based on the selection. Like this one:

Which department would you like to contact?
[select department "CEO" "Sales" "Support"]
[group ceo-group]...[/group]
[group sales-group]...[/group]
[group support-group]...[/group]


Show [ceo-group] if [department] equals "CEO"
Show [sales-group] if [department] equals "Sales"
Show [support-group] if [department] equals "Support"

The email message might look something like this:

Dear [your-name],

Thank you for contacting us.
  Our CEO dude is a pretty busy guy, but we will try our best to 
  answer you before the end of the year.
  Our sales department will contact you soon and take all your money.[/sales-group][support-group]
  We are currently unable to process your request.

K bye,
The Company

Another example can be found in the tutorial.

Was this article helpful to you? Yes 1 No 2

How can we help?