Conditional logic

Conditional logic forms that only ask what applies

Build rules that show or hide questions, make them required, or skip pages based on what people answer. Each rule reads as a plain sentence, and you can try it before anyone fills in the form.

Questions and pages

Rules can show, hide, require or stop requiring questions, show or hide a page, and skip ahead to a later page.

Reads like a sentence

Every rule is shown as IF and THEN, and as a sentence such as “When Country is equal to India, show GST number.”

Hidden means not stored

Answers to questions that end up hidden are removed when the form is submitted, and checked again on the server.

Checked before publishing

Logic health flags broken or contradicting rules, and Try it shows what a respondent would see for any set of answers.

Why conditional logic forms get better answers

A long form loses people when it asks questions that don’t apply to them. Conditional logic forms fix that by changing as someone answers: a follow-up question appears only after a Yes, a business section shows only for companies, and a whole page is skipped when it isn’t relevant. The form gets shorter for each person, and the answers you collect are cleaner because nobody had to guess what to write in a field that didn’t fit.

How a rule is built in Dculus

Rules live in the Conditions tab of the builder. Each rule has two parts.

IF is one or more conditions. Each condition picks a question and a comparison, and the comparisons on offer depend on the question type:

  • Text, email, website and hidden fields: is equal to, is not equal to, contains, does not contain, starts with, ends with.
  • Number, rating and slider: is equal to, is not equal to, is less than, is greater than.
  • Date and time: is equal to, is not equal to, is before, is after.
  • Dropdown, multiple choice and yes/no: is equal to, is not equal to. Checkboxes and image choice: contains, does not contain.
  • Every type also has is empty and is filled. File upload and signature only offer those two.

With several conditions you choose whether any or all of them must match.

THEN is one or more actions: show, hide, require or stop requiring questions; show or hide a page; or skip ahead to a later page. Point an action at a column group and it applies to every question in it. While you edit, the rule is spelled out as a sentence, so you can read it back before saving. Rules can be turned off without deleting them, duplicated, and filtered by page or action.

You don’t have to start from an empty rule. The Conditions tab offers four starting patterns, and a Describe your conditions box where you write something like “Hide the GST field unless Country is India” and the AI proposes a rule for you to accept or dismiss. The AI form builder chat can propose rules the same way.

Five patterns worth copying

  1. Follow-up on Yes. IF “Do you have any allergies?” is equal to Yes, THEN show “Please list them” and require it. The details question never shows up empty for people who said No.
  2. Ask why only when it’s bad. IF a rating is less than 3, THEN show and require “What went wrong?”. Happy respondents finish faster.
  3. Skip a section. IF “Are you applying as an individual or a company?” is equal to Individual, THEN skip to the page after the company details.
  4. Route by link. Add a hidden field that reads a campaign tag from the form link. IF it is equal to “partner”, THEN show the partner referral question.
  5. Require one of two. IF the phone number is empty, THEN require the email address. Use the Stop requiring action for the reverse case.

What respondents see, and what gets stored

Rules run as people answer, on every page. A page whose questions are all hidden is skipped automatically. Skip to page only moves forward, from the page with the trigger question to a later page.

When the form is submitted, answers to hidden questions and to every question on a hidden page are removed. The server applies the same rules again before saving, so stored responses never contain answers the form hid. A hidden question is never required, whatever other rules say.

Check your logic before publishing

Logic gets hard to follow as rules pile up. Two tools help:

  • Logic health lists problems that would surprise a respondent: rules pointing at deleted questions, pages or options, rules that contradict each other, rules that depend on a later page, and questions that can never be shown. It can remove the broken parts for you.
  • Try it lets you set answers and shows how many questions and pages are hidden or required as a result.

Limitations

Rules act on whole questions and pages. You can’t yet hide single options inside a dropdown or checkbox list. Skips go forward only. Rules compare answers to fixed values; they don’t do arithmetic or compare two answers with each other.

To quote an earlier answer inside a later question instead of hiding it, see answer piping. For ready-made multi-page forms to add logic to, start with the patient intake form or browse all form templates.

What teams use it for

  • Asking for details only when someone answers Yes
  • Medical and intake forms with follow-up questions
  • Skipping sections that don't apply to a respondent
  • Requiring a reason only when a rating is low
  • Different questions for individuals and companies
  • Routing by a campaign tag passed in the form link
  • Event forms that ask about guests only when someone brings one

Questions

What is conditional logic in a form?

Conditional logic changes the form based on earlier answers: a question appears, disappears or becomes required, or a whole section is skipped. Respondents only see what applies to them.

What is the difference between skip logic and show/hide logic?

Show/hide logic controls single questions or pages. Skip logic jumps a respondent from one page to a later one, hiding the pages in between. Dculus supports both.

Are answers to hidden questions saved?

No. When the form is submitted, answers to questions or pages that are hidden are removed, and the server removes them again before saving.

Can a rule depend on more than one answer?

Yes. A rule can have several conditions, and you choose whether any of them or all of them must match. One rule can also run several actions.

Can I make a question required only in some cases?

Yes. Use the Require field action. A hidden question is never required, even if a rule asks for it.

Can I hide individual options in a dropdown based on an answer?

Not today. Rules act on whole questions and pages, not on single options.

Can I use logic with values from the form link?

Yes. Hidden fields read their value from the link, and rules can test them with text comparisons like equals, contains or starts with.