Skip to content

Show and hide options

Conditional rules let one option’s answer control another. A rule reads:

When [trigger option] is [value], [action] [target option].

Action Effect
Show Reveal the target option.
Hide Remove the target option.
Require Make the target option mandatory.
Make optional Make the target option not mandatory.

These matter once you have more than one rule, and they are what makes the behaviour predictable:

  • An option targeted by a show rule starts hidden. It appears only while one of its show rules matches. This is what makes “show B when A = x” behave the way you expect.
  • An option targeted by no show rule starts visible.
  • Hide beats show. If both match, the option is hidden.
  • Make optional beats require. The safer failure is letting a customer through, not blocking a cart on a field they cannot fix.
  • A hidden option is never required. You cannot answer what you cannot see.
  • A hidden option cannot trigger anything. Its answer does not count while it is invisible, so chains collapse correctly when a link disappears.

Rules can chain: A reveals B, B reveals C. Hiding A hides both B and C, because B’s answer stops counting the moment B is hidden.

Cycles — A shows B, B shows A — do not crash the widget, but they produce a state that is hard to reason about and harder to support. Avoid them.

Put a trigger option above the options it reveals. A field appearing above the one the customer just answered reads as a glitch, even though it is working correctly.

An option that is hidden when the customer adds to cart contributes nothing to the price, and its answer is not recorded on the order. A customer is never charged for a field they could not see. See How pricing works.

A Personalisation checkbox revealing two fields:

Rule
When Personalisation is Yes, show Engraving text.
When Personalisation is Yes, require Engraving text.
When Personalisation is Yes, show Font.

Unticked, the customer sees one checkbox. Ticked, the two fields appear and the engraving text becomes mandatory. Unticking again hides both, clears their contribution to the price, and unblocks add-to-cart.

Test the unticked path as well as the ticked one. The common mistake is a required option that is revealed by a rule but never un-required, leaving customers unable to add to cart in the default state with no visible reason why.