Guides

Conditional logic in forms: show questions based on answers

How conditional logic shows or hides questions based on earlier answers, with examples you can copy, good practices and a step-by-step setup in quibby.

Published 6 min read

On this page
  1. What conditional logic is
  2. Examples you can copy
  3. The rules you can use
  4. Good practices for conditional forms
  5. What respondents see and what gets stored
  6. How to set up conditional logic in quibby
  7. Frequently asked questions

Conditional logic lets a form show a question only when earlier answers make it relevant, so each person sees a shorter form that fits their situation. Below you'll find how it works, examples you can reuse, the practices that keep it manageable and how to set it up step by step.

In short:

  • Conditional logic shows or hides a question depending on earlier answers.
  • Typical uses: follow-ups after a “yes”, a “what went wrong?” after a low rating, or a section only some people need.
  • Put the deciding questions early and keep the rules simple.
  • Hidden questions are never required and their answers aren't stored.
  • Test every path in the preview before you publish.

What conditional logic is

A conditional question carries a rule such as “show this only if the answer to question 3 is Yes”. As soon as someone answers question 3, the form checks the rule and the follow-up appears or stays hidden. People never see questions that don't apply to them.

This is often called show/hide logic. It's different from branching that jumps to a specific page or ends the form differently depending on the answer. In quibby, conditional logic is show/hide only: there is no “jump to page” and no separate ending per answer, but hiding single questions or whole pages covers most needs.

The payoff is shorter forms for respondents and cleaner data for you, because nobody types “N/A” into questions that don't concern them.

Examples you can copy

Event registration: guest details

Ask “Will you bring a guest?” as a yes/no question. Then add “Guest's full name” and “Does your guest have any dietary needs?” with the rule Will you bring a guest? is Yes. People coming alone never see the guest questions. Our event registration form checklist covers the rest of that form.

Customer feedback: follow up on the rating

After a 1 to 5 star rating, show “Sorry to hear that. What went wrong?” when the rating is at most 2, and “What did you like most?” when it is at least 4. Each person gets one relevant follow-up instead of two generic ones.

Order form: delivery or pickup

Ask “Delivery or pickup?” as a single choice. Put a page break before the address questions and give that page break the rule Delivery or pickup? is Delivery. In the classic layout, the whole address page is skipped for pickup orders.

Support request: catch a keyword

Under a long text question such as “Describe the problem”, show “What is your order number?” when the answer contains the word “order”. Text rules ignore capitals and accents, so “Order” matches too.

The rules you can use

The conditions on offer depend on the type of the earlier question:

Earlier questionConditions
Single choice, dropdown, yes/nois, is not
Multiple choiceincludes, does not include
Number, rating, scaleequals, is not equal to, greater than, less than, at least, at most
Date, timeequals, before, after
Text (short, long, email, phone, website)is, is not, contains
Any questionanswered, not answered

You can combine up to 10 rules on one question and choose whether all of them must be met or any one is enough. For example, show a “Parking pass” question only if Ticket type is VIP and Arriving by car? is Yes (all). Or show a “Tell us more” box if Rating is at most 2 or Would you recommend us? is No (any).

Rules can only look at questions that come before, so a form can never loop back on itself.

Good practices for conditional forms

  • Ask the deciding question early. Rules look backwards, so the question that decides must come first. If you later move it below its follow-up, that rule stops applying.
  • Keep rules readable. If it takes many rules to explain why a question appears, the form may be doing too much. Two separate forms can be clearer.
  • Make follow-ups stand on their own. “Guest's full name” reads better than “Name” when it suddenly appears.
  • Don't hide what everyone must answer. Core questions, such as contact details, should be visible to all.
  • Test every path. Walk through the preview once per answer that changes the form: yes and no, high and low rating, delivery and pickup.
  • Expect blank cells. In the responses spreadsheet, a hidden question is simply empty for people who didn't see it. That's correct, not missing data.

What respondents see and what gets stored

Hidden questions are never required, even if you marked them as required, so nobody gets stuck on a question they can't see. If someone answers a follow-up and then changes an earlier answer so it hides again, that answer is not stored.

In a quiz, hidden questions don't count toward the score, so nobody is penalized for questions they never saw. A text block can be conditional as well, which is handy for a short tailored message, such as “Thanks, we'll look into this”, shown only to people who reported a problem.

How to set up conditional logic in quibby

  1. Open your form in the builder, on the Questions tab.
  2. Add the deciding question first, for example a yes/no or a rating.
  3. Add the follow-up question below it.
  4. Select the follow-up and, in its question settings, turn on “Show only if…”.
  5. Pick the earlier question, the condition and the value, for example Will you bring a guest? is Yes.
  6. Need more than one condition? Click “Add condition” and choose “All are met” or “Any is met”.
  7. To hide a whole section in the classic layout, add the rule to the page break that starts it.
  8. Try each path in the preview, then publish. Respondents only see the change once you publish.

Frequently asked questions

What is the difference between conditional logic and skip logic?

The terms are often used for the same idea: changing a form based on answers. Strictly, skip or branching logic jumps people to another page, while conditional logic shows or hides individual questions or sections. Here you get show/hide for questions and whole pages, without jumps.

Can a form show a different thank-you page depending on the answers?

Not as a separate ending screen: quibby has one ending screen per form. You can, however, show a conditional text block with a tailored message just before people submit, which covers many of the same needs.

Do hidden required questions stop people from submitting?

No. A question hidden by its rules is never required, so it can't block submission. Only the questions a person actually sees can be required.

How many conditions can one question have?

Up to 10, combined with “all” (every rule must be met) or “any” (one is enough). If you find yourself near that number, consider simplifying the form or splitting it in two.

Your next form is one sentence away

Create it with AI or by hand, share it in seconds and watch the responses arrive. Free.