Advanced Conditions
Jan Moravec avatar
Written by Jan Moravec
Updated over a week ago

How to skip a blank line caused by an undisplayed condition?

If you know your way around HTML, just go to Source view and insert <br /> inside the condition before the closing {/if} statement:

{if not empty(mobile)}Mobile phone: {mobile}<br />{/if}

It will look like this in the template:

{if not empty(mobile)Mobile phone: {mobile}
{/if}{if not empty(companyPhone)}Company phone: {companyPhone}{/if}

Skipping the blank line for Placeholder elements

Conditions nesting

You can also achieve great results with the conditions. For example this one:

{if not empty (phone)}{phone}{/if}{if not empty (mobile)}{mobile}{/if}{if empty(phone) and empty(mobile)}{companyPhone}{/if}

This nested condition states that if the user doesn't have a populated {phone} field, the {mobile} should be used instead. If even {mobile} isn't populated, the {companyPhone} will be used.


This condition is used in case you want specific information to be displayed if certain conditions are met.
As you can see in this example, if the user doesn't have his personal {phone} field completed, the general {companyPhone} will be displayed instead.

{if not empty(phone)}{phone}{else}{companyPhone}{/if}

If (NOT) equals

You can tie your conditions to the specific content inside a field.

The easiest way is to do so in the Condition editor, you can set the option there to Is equal to or Is NOT equal to.

Add to the adjacent box what you want to be matched to the field content and fill in what should happen if the condition is met or isn't.

After you do so and approve, a condition will be added to your template:

{if not equals(customField1, "xxx")}yyy{else}zzz{/if}

This is the correct format you need to follow if you want to type out your conditions manually.

Did this answer your question?