Skip to main content

Show or hide fields and sections

What it does​

A rule shows or hides parts of your form depending on an answer. For example, Describe the damage appears only when the visitor says the item arrived damaged, and the Exchange details section appears only for an exchange. Visitors see a shorter form with only the questions that apply to them.

A rule has three parts:

  • When: the field whose answer decides, called the trigger field, and the options that count.
  • Then: Show or Hide.
  • What to show or hide: fields, whole sections, or the Submit button.

You make rules in the builder, on the Logic board.

Add Conditional Logic to a Form2:42Watch on YouTube

Before you start​

  • The trigger field is a Select, Radio, Checkbox, Contact, Swatches or Gallery field, or an option field of the Zendesk or Mailchimp add-on: a field with options. For a Gallery field, you pick the pictures that count. A Rating field can start a rule too, with its stars as the values. Text fields can't start a rule.
  • The trigger field comes before the fields it controls, so visitors answer it first.
  • To show or hide a group of fields together, put them in a section. See Adding fields and sections.
  • Rules on this page change what visitors see on the form. To send an email or show a confirmation only for some answers, use conditions instead. See Condition operators.

Steps​

Open the logic board​

  1. Go to Content → WebForms → Manage Forms and click the form's name.
  2. Click Form Builder, or Open Draft if the form already has a draft.
  3. Click Logic in the top bar. The number next to it counts the form's rules.

You can also select a field with options, click its Logic tab in the right panel, then Manage conditional logic.

To go back to the form, click Back at the left end of the top bar.

Add a rule​

  1. Click New rule. The New rule panel opens on the right.

  2. In Trigger field, select the field whose answer decides, for example Reason.

  3. In Condition, select is or is not.

  4. Under Values, select the options that count, for example Arrived damaged.

    On a Select, Radio or Contact field, two or more options mean the rule matches when the visitor picks any of them. On a Checkbox field, Customer must select appears: Any of these matches one ticked option, All of these needs every option you selected.

  5. In Action, select Show or Hide.

  6. Under Fields & sections, select what the rule controls:

    • To control a whole section, select the section.
    • To control one field, click the arrow next to its section, then select the field.
    • To control the Submit button, open Form actions.

    The line at the top of the panel sums up the rule, for example "Show Describe the damage when Reason is Arrived damaged".

    New rule panel summed up as Show Describe the damage when Reason is Arrived damaged, with those trigger field, value, action and target set
  7. Click Save rule. The top bar says "Rule saved." and the rule goes into the form's draft.

  8. Click Publish Changes, then Publish in the dialog.

The section that holds the trigger field can't be selected: the rule would hide its own question.

Switch a rule off or change it​

  • To pause a rule, turn off its Enabled switch on the board. A rule that is switched off is kept, but it doesn't run.
  • To change a rule, click the three dots at the end of its row, then Edit.
  • To remove a rule, click the three dots, then Delete, and confirm in the dialog "Delete this rule?".

Publish the form after each change. Visitors see the live form until you do.

What you should see​

The board groups the rules by trigger field. Each row shows the options after IS, IS NOT, ANY OF or ALL OF, what happens, and what it applies to.

Logic board with four rules grouped under Reason, What would you like? and No order number?, each row with options, Show or Hide, target and switch

On the canvas, a trigger field carries a badge such as 2 rules, and a field that a rule shows reads, for example, "Shown when Reason is Arrived damaged or Wrong item".

On the store, after you publish:

  • A field or section that a Show rule controls is hidden until the visitor gives a matching answer. A Hide rule works the other way round: the field is visible until the answer matches.
  • With is not, the rule matches only after the visitor has answered. A question left empty doesn't match.
  • A hidden field isn't checked, even if it's required. The visitor can send the form without it.
  • The answer of a hidden field isn't saved. If the visitor typed something and then changed the answer that hides the field, the text is dropped. The Inbox and the emails show only the fields the visitor could see.

Limits​

  • Only fields with options start a rule. A rule can't react to typed text, a number or a date.
  • A rule can't hide the section that contains its own trigger field.
  • On a multi-step form, a hidden section is skipped as a step. A section whose fields are all hidden one by one still shows as an empty step, so hide the section itself.
  • Under Values, the panel also lists the placeholder of a Select field, the first entry that asks the visitor to choose. Don't select it as a value.
  • A rule is the same on every store view. With a store view selected in the builder, the board lets you change only a rule's options and its Enabled switch. See Store views and translations.

Troubleshooting​

  • The field never appears. Check the rule's options and that its Enabled switch is on. Then check that you published the form.
  • The field is visible from the start. The rule may use Hide, which leaves the field visible until the answer matches: use Show instead. Also check that the rule's Enabled switch is on and that you published the form.
  • No rule works: every field shows, or the fields never react to answers. This happens to all rules at once, often after an update or a theme change. Your store hides a rule's fields with the WebForms styles and shows them with the WebForms scripts. If every field is visible from the start, the styles didn't load: see Form looks unstyled or broken. If the fields stay hidden whatever the visitor answers, the scripts didn't start, and Submit stays greyed out too: see check 2 in Submit button does nothing.
  • An empty step or section shows on the store. All its fields are hidden one by one. Make the rule show or hide the section.
  • The visitor can't send the form. A rule may hide the Submit button. Check the rules that list Submit button on the board.
  • A rule works on one store view but not on another. The trigger's options are translated there, and the rule still holds the untranslated ones. Open the board with that store view selected and pick the translated options. See Store views and translations.

What's next​

Applies to WebForms 4Last reviewed November 2, 2026