Conditions for messages

With conditions for messages, you can define conditions in addition to the standard publication fields that must be met for a message to be sent.

Example

You want to send all emails to the sales department. Urgent inquiries should in addtion be sent to a special team. The customer himself decides in the form whether it is an urgent inquiry.

Then let’s create the checkbox in our form:

Screenshot of the form generator in the back end. We add a checkbox called “urgent”. The value, if checked, is “yes”.

In the front end, it looks something like this for our customers:

Screenshot of the front end with our checkbox

Now we can use ##form_urgent## === 'yes' to send an entire message only if the customer has ticked this checkbox:

Screenshot of the condition in the back end

Technically speaking, you don’t need the ## when defining conditions. They are removed before being evaluated. Using them is only for your own usability as they trigger autocompletion. But you might as well write form_urgent === 'yes' directly. Both variants will work. Conditions within the e-mail text, for example, are also written without the ## (e.g. {if form_urgent === 'yes'}).

This function is particularly powerful in combination with custom tokens!