Conditional Script Generator

Conditional script generators can show or hide elements on the page depending on certain conditions and values. Currently they can only be added by right-clicking any element on the page and clicking "Make Conditional". If the current element does not have an ID, one will be automatically generated.

Though an ID is added automatically, the conditional script can function with a class selector. It cannot, however, affect a Text selection.

Conditional Script Generator Properties:

  • Name: The name of the script, making it easier to identify it.
  • Find: 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.
  • 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 checked. 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 Data Field "Gender" is "Equal To" the value "Mr", in order to show a paragraph or an image applying only to male customers.

Table of Contents

Index

Glossary

-Search-

Back