Forms · Glossary

What is conditional logic?

Conditional logic shows or hides part of a form based on what somebody has already answered. Say yes to do you have a dietary requirement and the box asking which one appears; say no and it never does. The point is that every person only sees the questions that apply to them, which shortens the form without removing anything.

Conditional logic is how a form of forty possible questions becomes a form of twelve actual ones. It is also how a form becomes impossible to test, if you let it grow.

· Co-founder

3 min read · Published

What it is for

Two things. Removing questions that do not apply, which is the obvious one, and routing people down genuinely different paths, which is the powerful one. A single form can serve an existing customer and a new one, or a domestic and an international order, without either of them wading through the other's questions. The person filling it in sees a short, relevant form and never knows the rest existed.

Where it goes wrong

Complexity compounds. Two conditions are easy to hold in your head; six interacting conditions produce paths nobody has ever walked, and the one that breaks is always the one a real person takes. Every branch also multiplies your testing: a form with four independent yes or no conditions has sixteen possible shapes. If you cannot list the paths, you cannot claim the form works.

What it does to your data

Hidden questions produce empty columns in the export, and an empty cell is ambiguous: it can mean they were not asked, or they were asked and skipped. If a question matters analytically, record the branch as well as the answer, or ask the qualifying question in a way that lands in its own column. Otherwise you spend the analysis reconstructing who saw what.

Questions people ask

Does hiding a question delete the answer?

If somebody answers a question and then changes an earlier answer so it hides, you have to decide whether the hidden answer is kept or cleared. Keeping it can put contradictory data in your export; clearing it can lose work if they change back. Whichever it does, know which, because it shows up in the export either way.

How many conditions is too many?

If you cannot draw the paths on one sheet of paper, it is too many. Four independent conditions already give sixteen versions of the form. A useful discipline is to write down every path and fill in the form once for each before you publish it.

Does conditional logic help completion rates?

Yes, when it removes questions rather than adding steps. People abandon forms that feel long, and a form that visibly shrinks as they answer feels short. What does not help is logic that makes new questions appear repeatedly, which feels like a form that keeps growing.

Is it accessible?

It can be, but revealed content needs to be announced rather than silently inserted, or somebody using a screen reader will not know a new question appeared. Reveal the question immediately below the one that triggered it, in the same reading order, rather than somewhere further down the page.

Should I use logic or two separate forms?

Two forms are better when the paths share almost nothing, because each stays simple and testable and the exports are clean. Logic is better when they share most questions and differ in a few, since two near duplicate forms drift apart the first time somebody edits only one.

Make one with forms

The button opens the generator with this use case already described. Change the wording to match your own.

Create a form with OneCraft

Related questions

Sources

Written and checked by the OneCraft team. Last checked .