Conditional script dialog

Conditional script generators can show or hide elements on the page depending on certain conditions and values. They can be added by right-clicking any element in a template and clicking Make Conditional. If the current element does not have an ID, one will be automatically generated. See Showing content conditionally.

The options in the Conditional Script wizard are:

  • Name: The name of the script, making it easier to identify it.
  • Selector: The Selector or Text to apply the result of the script to.
    • Selector: Uses CSS selectors to find the element to which the script applies.
    • Text: Uses text as a trigger for the script. The script applies to all instances of the text found in the template.
    • Selector and Text: Uses text as a trigger for the script but only applies to text within the specified Selector.

    For more information about Selectors see Using the Text Script Wizard.

  • Action: Use the drop-down to select whether to Show or Hide the element when the condition below is true.
  • Data Field: Use the drop-down to select which data field in the record the condition will be based on.
  • Condition: Select which kind of condition is applied. Possible options are: Equal to, Not equal to, Contains, Does not contain, Begins with, Ends with.
  • Value: The value used for the conditional check.

For example, you could check whether the value in the data field "Gender" is "Equal To" the value Mr, in order to show a paragraph or an image applying only to male customers.

 
  • Last Topic Update: 11:42 AM Jul-11-2016
  • Last Published: 2019-05-22 : 2:52 PM