Dynamically adjust email and thank you message content without PHP knowledge

A common need of RSForm!Pro users is to remove uncompleted fields from the User/Admin/Additional emails/Thank You message's text. Until now, achieving this was possible (see this article), but a little too complicated for non-PHP savvy users.

We have simplified this process by adding a custom syntax in the text of the User Email, Admin Email, Additional Emails and the Thank you message.

This syntax is based on a simple if condition and looks like this:

{if {name_of_field:value}} Display this text if the form_component field has a set value.{/if}

You will have to replace name_of_field with your actual field's name.

Note: The syntax is similar to HTML as it has an opening and an ending tag.

RSForm!Pro also allows you to compare the value of the field when using if statements.


{if {name_of_field:value}}The submitted message is {name_of_field:value}.{/if}
The string found within the {if} syntax will not show if the field has no value.

The {if} clause also accept the following operators:

<= , >=, <>, <, >, !=, =,==,===, <-, ->

Assuming that you have a checkbox and you need to compare its value with a specific string, you will use:

{if {Checkbox:value}<-Item1}This text will be displayed only if the Item1 value is selected{/if}
If you want to display a text if the checkbox has one of your desired values, you will use the following syntax:
{if {Checkbox:value}->Item1,Item2}This text will be displayed if one of the following values is selected: Item1 or Item2{/if}

If you want to see if the user entered a specific value into a field you can use the following syntax:

{if {field_name:value}=Your desired value} this text gets displayed only if the placeholder has the "Your desired value" value {/if}

Notice the blank space between "if" and the field placeholder.

35 persons found this article helpful.

Was this article helpful?

Yes No
Sorry about that

You Should Also Read

How do I show the uploaded image in the Thank You message?

Setting up the Thank You message to open a new window

Loading content plugins in the Thank You message