Inline Conditions
Inline conditions are used within the Rich Text Editor and within the Free Text Heading Element. They can be used for AutoResponders, Notifications, Workflow Pages, Dynamic PDFs and Print Templates to conditionally display content. Inline conditions are for advanced users and provide an alternative to Conditional Content.
Using Inline Conditions
Inline conditions are simple conditions, IF/THEN conditions written using the format shown below:
{IF [Insurance Type] = 'Home' THEN}
You have selected Home Insurance
{ENDIF}
Anything inside the opening {IF [condition] THEN} tag and the closing {ENDIF} tag will be output if the match is true.
Syntax Guidelines
- There is no support for ELSE statements. Use multiple IF statements instead
- There is no support for nested Inline Conditions.
- The {ENDIF} (closing tag) must be included, or an error will be generated
- Keep the
[Field Name]or[currentUser:Field Name]wildcard without single quotes on the left side of the operator (=or<>), and put the comparison value in single quotes on the right side. Wrapping the wildcard in single quotes compares the literal wildcard text instead of the field value.
Using CurrentUser Wildcards on a Workflow Custom Page
On a secured Workflow Custom Page, use an Inline Condition with a CurrentUser wildcard to show or hide content based on the logged-in user's member database record:
{IF [currentUser:Invite Status] <> 'Verified' THEN}
<div class="welcome-message"><strong>Welcome!</strong> Complete your profile to get started.</div>
{ENDIF}
When you save the Custom Page Layout Editor, Logiforms links [currentUser:Invite Status] to that field in the workflow's member database form. Use an Inline Condition rather than the editor's Conditional Content toolbar button, which checks standard form fields instead of currentUser: fields on a standalone Custom Page.
Older Style Syntax
This article has been updated as of June 2018, to show the curly bracket syntax. The older HTML comment style syntax (shown below) is still supported but no longer the preferred way to use Inline Conditions.
<!-- IF [Country Field] = 'CA' THEN You are from canada!-->
0 Comments