Conditional logic you can actually read

By The Askery Team

  • conditional logic
  • form design
  • ux
Conditional logic you can actually read

Logic is where forms get powerful - and unreadable

A form that asks everyone every question converts badly and produces messy data. The fix is conditional logic: show each respondent only the questions that apply to them. This is the single highest-leverage upgrade most forms can make.

It is also where forms quietly become unmaintainable. The first three rules are obvious. By rule thirty, nobody on the team can answer a simple question - 'if someone picks Enterprise and is outside the US, which questions do they actually see?' - without tracing the form by hand.

Power without observability is its own trap. The problem is rarely that a form has too much logic; it is that the logic cannot be read.

Make every rule a sentence

A rule you cannot state in one plain sentence is a rule you should not ship. 'Show the Procurement section when Plan is Enterprise' is reviewable by a non-technical stakeholder. A nested boolean expression with five clauses is not, no matter how correct it is.

Rendering logic as readable statements rather than raw expressions is not a cosmetic choice. It moves correctness review out of engineering and into the hands of the person who actually knows whether the routing is right - usually the person who owns the survey, not the person who built the tool.

When a rule resists being a single sentence, that is signal, not friction. It usually means the form is trying to express two decisions at once and should be split.

Patterns that hold up

Qualify first. Ask the routing question early - role, plan, region, intent - and branch the rest of the form from that one answer. A single deliberate fork is far easier to reason about than logic scattered across twenty fields.

Collapse, do not bury. Hide whole sections rather than sprinkling individual conditional fields through a page. 'This section appears for X' is one fact to hold in your head; 'these nine fields each have their own condition' is nine.

Only depend on the past. A rule should reference answers the respondent has already given. This sounds obvious and is the most common real bug - see the deeper treatment in our complete guide to conditional logic.

The forward-reference bug

The classic failure is a rule on an early question that depends on a later one. At the moment the rule needs to evaluate, the answer it needs does not exist yet. Depending on the tool, this fails silently - the branch just never fires - which is worse than failing loudly.

The defense is structural, not vigilance. Logic should only be allowed to reference questions that precede it in the flow, and the builder should make a forward reference impossible to express rather than merely discouraged. Constraints you cannot violate beat conventions you are asked to remember.

Observability is the upgrade trigger

Teams rarely outgrow a form tool because it lacks a feature. They outgrow it the day they can no longer trust that the logic does what they think it does. That loss of confidence is the actual churn event, and it happens long before anyone files a bug.

So the bar for conditional logic is not 'can it express this rule'. Almost anything can. The bar is 'can a non-author look at the form a year from now and correctly say who sees what'. If the answer is no, the logic is a liability regardless of how clever it is.