Conditionally Display Content

The content shortcode allows you to perform conditional logic in the message content of Notification emails as well as the Confirmation Message that is displayed when a form is submitted.

The content shortcode consists of an opening and closing shortcode. Any text or content contained within the opening and closing conditional shortcode will be the content that is conditionally displayed.

In this article

Options

merge_tag

The form merge tag who’s value you are executing the conditional logic for. You can get the correct merge tag for the form data you would like to use using the insert merge tag drop down.

condition

The type of condition used to determine success. Available conditions are:

  • is
  • isnot
  • greater_than
  • less_than
  • contains
  • starts_with
  • ends_with

value

The value that the condition must equal in order for the condition to be met and the content displayed.

[content merge_tag="{Number:1}" condition="greater_than" value="3"]
Content you would like to conditionally display.
[/content]

Examples

Show content if a certain checkbox was checked

In this case we use the :value modifier to ensure we’re checking the value (that can be different from the label). And we’re using the “contains” condition instead of “is” because the value for a checkboxes field can contain different choices separated by a comma.

[content merge_tag="{Checkboxes:1:value}" condition="contains" value="10"]
This content would be displayed if the value of field id 1 has a 10.
[/content]

Show content if a certain field is not empty

In this example, we want to show our content only if a Text field with id 5 is not empty.

[content merge_tag="{Text:5}" condition="isnot" value=""]
This content would be displayed if a value exists for field id 5.
[/content]

Show content based on the price for a product field set to Radio Buttons type

In this example, we want to show our content only if the choice selected has a price of 3. Note the use of the :price merge tag modifier, and the lack of the currency symbol for the value.

[content merge_tag="{Radio Product:5:price}" condition="is" value="3"]
This content would be displayed if the choice selected has a price of 3.
[/content]

Not quite what you’re looking for?

Contact our support team through email and chat or get the job done with a pro.

Join more than 80,000 brands using Woorise

Easily create landing pages, forms, surveys, quizzes & viral giveaways that drive real user engagement.