Skip to content

Conditional fields (legacy templates)

This article is for pre-2022 templates, built with our legacy HTML syntax: use it if your tags are in $tag; format. If you use Liquid templates, see Conditional fields (Liquid templates).

  • You can make a field optional if some users use it and others don’t. Optional fields are removed automatically from email signatures that don’t use the field.
  • You can wrap IF statements around any signature element, to make it appear only if that field is used.

HTML code. Each field has its own {if_field} block, and a nested condition shows the separator only when both fields have values:

Legacy HTML with {if_phone} and {if_mobile} blocks around the phone and mobile, and a nested if_phone and if_mobile block around the separator

Signature preview with logic:

The signature preview showing the phone, separator, and mobile, each wrapped in its legacy if tags

Recipient’s email rendering. If either field is removed, the separator line is removed too.

A rendered line with a phone number and a mobile number separated by a vertical bar

HTML code. The whole table row is wrapped in the field’s if tags:

Legacy HTML with a table row for a scheduling link wrapped in {if_calendar_link} and {/if_calendar_link}

Signature preview with logic:

A signature preview with the calendar link, mobile, and email lines wrapped in their legacy if tags

Need “not if” logic? Opensense can do this too. Wrap your HTML code with {nif_field}Alternative Text{/nif_field} instead.

For example: {nif_phone}1-800-MAINLINE{/nif_phone}

For further help, contact Opensense Support at help@opensense.com.

Screenshot preview

Screenshot