Conditional logic in documents allows you to show or hide selected text, images, tables or individual table rows based on specific conditions.
This article will covers:
- Getting Started
- Creating New Conditional Logic
- Applying Existing Conditional Logic
- How Conditional Logic Appears in the Document
- Editing Conditional Logic
Getting Started
How you apply conditional logic depends on the type of content.
Text and Images
To show or hide text or images, select the content and click the conditional logic icon in the toolbar.
Tables and Rows
To show or hide a table or an individual row, click inside a cell to open the table toolbar, then select Table or Row.
Once you've clicked the conditional logic icon, the Conditional Logic window will appear:
From here you can choose to:
- Create new conditional logic or
-
Use any existing conditional logic that has already been created in the document or in forms.
Creating New Conditional Logic
To create new conditional logic, click + CREATE NEW.
Start by entering a title for your conditional logic. Choose a descriptive title so you can easily identify what the logic does.
Next, click + Add condition to start creating your conditional rules.
Then click Element.
Select a question from your list of forms and click SAVE.
Select a rule, for example is equal to or is any of. See Conditional logic rules for the full list.
Select or enter the value that should be compared to the answer given on the form.
When adding multiple rules, choose whether All or Any of them must be true for the condition to be met.
When adding multiple rules, choose whether All or Any of them must be true for the condition to be met.
Click + Add condition to set more rules.
If you need to combine “All” and “Any” in a single set of conditions, you'll need to create one or more conditional groups by clicking + Add conditional group.
Once you're satisfied with your conditional logic, click CREATE.
Once you have created the logic, choose whether the selected content should be shown or hidden when the condition is true.
When you click SAVE the logic will be applied to the element you selected in the document.
Applying Existing Conditional Logic
If you choose to use existing conditional logic, all previously created logic will appear in the window, divided into two groups:
- Form logic: Logic associated with a form, named after the form it is connected to.
- Custom logic: Logic that you have created and named yourself.
Select the logic you want to use, choose Show or Hide under Visibility, and click SAVE.
To see the rules behind a logic, click View details.
How Conditional Logic Appears in the Document
Conditional content is marked with a dashed border and a label indicating whether the content should be shown or hidden when the condition is met, along with the name of the applied logic. For example, "Show content if Customer prefers English".
Conditional table rows are marked in the same way, with labels beginning with "Show row if" or "Hide row if".
Editing Conditional Logic
To change or remove the conditional logic, hover over the block and click the label to open the menu.
From the menu, you can:
- Show / Hide: Choose whether the content is shown or hidden when the condition is met.
- Change condition: Select different existing conditional logic or create new logic.
- Remove condition: Remove the conditional logic while keeping the content.
- Delete content: Delete the conditional logic and everything inside it.
The Show and Hide options are available in a dropdown at the top of the menu.
To edit the content inside a conditional block, click on it and start typing.
Clicking Change condition opens the conditional logic window, where you can select different logic, change the visibility setting, or create new logic.