Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{if($formField==yes)}

    Congratulations, you were accepted

{else if($formField2==no)}

    Sorry, try again

{else}

    No result yet

{end}

Comparing phrases with Space(s) in between

If you wish to compare phrases which contain spaces in between, be sure to wrap the phrase in ' ' or the condition will not work as expected

Examples

{if($studentFirstName==John Doe)}

✔️ {if($studentFirstName=='John Doe')}

{if($grade==Grade 5)}

✔️ {if($grade=='Grade 5')}

Chaining Multiple Conditions

You can chain multiple conditions by using the AND (&&) and OR (||) operators to create more complicated conditions.

Using AND (&&)

Note

There is currently an issue where creating a if statement that uses && breaks that statement. If you require && in your dynamic email setup, please notify the SchoolEngage team and we would be glad to touch up the email template so it works as expected.

Issue: the editor converts && to &&

Resolution: SchoolEngage team goes into the Custom Email Template file and change all instances of && to &&

Code Block
{if(<field>==<value> && <field>==<value> &&...)}

...