Skip to content
Open backoffice ↗

Designing forms · UMBRACO

Conditional logic & rules

Build readable AND/OR conditions and test every branch.

Show a field only when it is relevant

Select the target field and open Conditional Logic. Enable the condition, choose the source field, select an operator and enter or select the comparison value. For choice controls, compare the stored option value rather than assuming it equals the visible label.

Use All rules (AND) when every condition must match. Use Any rule (OR) when one match is sufficient. Group conditions to express mixed logic clearly instead of adding unrelated rows to a single flat list.

Example: company details

Show company_name when registration_type equals business. Show vat_number when registration is business and needs_invoice is true. Keep each target's conditions near the field so another editor can understand them.

Use type-appropriate comparisons: numeric bounds for numbers, membership/contains for multi-choice values, and empty/not-empty when checking whether an answer exists. Operators available in the editor depend on the source field.

Test both directions

  1. Start with no answer and check the initial visibility.
  2. Select the triggering value, then change it back.
  3. Test AND/OR branches and nested groups independently.
  4. Navigate Back/Next in a multi-step form.
  5. Submit and inspect the stored values, especially answers entered before a field became hidden.

Keep field visibility separate from workflow decisions. A workflow condition decides which server action runs after submission; hiding a field does not grant or revoke access.