Conditional logic examples
What it does
Four rules that make a return form ask only what each customer needs to answer. The examples build one form, Return or Exchange, in order: each adds a few fields and one rule, and the third reuses the Reason field of the first. To use one in your own form, add the fields it names, then the rule, and change the names to yours.
In the finished form, the customer chooses a refund or an exchange and gives a reason, and your team learns when to collect a damaged item.
Uses: Show or hide fields and sections and Adding fields and sections.
Before you start
- You have a form open in the builder, for example a new blank form. See Creating forms.
- You know how to add fields, sections and options. See Adding fields and sections and Options.
- You know how to open the Logic board and add a rule. See Show or hide fields and sections.
- After each rule, click Publish Changes, then Publish in the dialog, so your store shows it.
Steps
Ask for details only when they apply
The customer describes the damage only if the item arrived damaged.
-
Add a section and give it the Section Title Your return.
-
In it, add a Select field with the label Reason.
-
Give Reason the options Changed my mind, Arrived damaged, Wrong item and Other.
-
Below Reason, add a Textarea field with the label Describe the damage.
-
Select Required for Describe the damage.
-
On the Logic board, click New rule and fill it in:
Setting Value Trigger field Reason Condition is Values Arrived damaged Action Show Fields & sections Describe the damage, under Your return -
Click Save rule.
Describe the damage stays hidden until the customer selects Arrived damaged. It's required only while it's visible.
Show a whole section for one answer
Only customers who want an exchange see the questions about the new item.
-
In Your return, above Reason, add a Radio field with the label What would you like?.
-
Give it the options A refund and An exchange.
-
Below Your return, add a section with the Section Title Exchange details.
-
In it, add a Text field with the label Item you want instead.
-
Add a rule:
Setting Value Trigger field What would you like? Condition is Values An exchange Action Show Fields & sections the section Exchange details -
Click Save rule.
The trigger field sits in Your return, not in the section it shows. The panel doesn't let a rule control the section that holds its own trigger field.
Show a section for any of several answers
Your team collects the item when it arrived damaged or was the wrong one. This example reuses Reason from the first one.
-
Below Exchange details, add a section with the Section Title Collection.
-
In it, add a Select field with the label Best day for collection.
-
Below it, add a Textarea field with the label Access notes.
-
Add a rule:
Setting Value Trigger field Reason Condition is Values Arrived damaged and Wrong item Action Show Fields & sections the section Collection -
Click Save rule. The board shows the rule as ANY OF Arrived damaged, Wrong item.
Reason now starts two rules. Each rule works on its own: Arrived damaged shows both Describe the damage and Collection, Wrong item shows only Collection.
Hide a required field that doesn't apply
Order number is required, but some customers can't find it. A tick lets them skip it.
-
Above Your return, add a section with the Section Title Your order.
-
In it, add a Text field with the label Order number.
-
Select Required for Order number.
-
Below it, add a Checkbox field with the label No order number?.
-
Give it one option, I can't find my order number.
-
Add a rule:
Setting Value Trigger field No order number? Condition is Values I can't find my order number Action Hide Fields & sections Order number, under Your order -
Click Save rule.
Order number is visible at first. When the customer ticks the box, it disappears, and they can send the form without it.
What you should see
Open the form on your store and try each answer.

- Reason set to Arrived damaged shows Describe the damage and the Collection section.
- Wrong item shows only Collection. Changed my mind or Other shows neither.
- An exchange shows Exchange details. A refund hides it again.
- Ticking I can't find my order number hides Order number, and the customer can send the form without it.
In Content → WebForms → Inbox, the page of each submission shows only the answers the customer could see.
Limits
- A rule starts only from a field with options. Conditions on emails and confirmations can test a typed answer, but they run after the form is sent and don't show or hide anything. See Condition operators.
- A rule can't show or hide the section that holds its own trigger field.
- If the customer types into a field and then changes the answer that hides it, the text isn't saved.
Troubleshooting
- The field shows from the start. The rule's Action is Hide, or the rule is switched off. For a follow-up question, use Show.
- Nothing changes on the store. Check that you published the form after saving the rules, that each rule's Enabled switch is on, and that its Values are the options you're choosing on the store.
- The section is greyed out in the panel. It holds the trigger field. Move the trigger field to another section, or control the fields one by one.
What's next
- Show or hide fields and sections: every setting of a rule, and how to switch rules off or change them.
- Multi-step forms: put Exchange details and Collection on steps of their own, so customers skip the ones they don't need.
- Condition operators: the comparisons for rules, emails and confirmations.