General · 4 min read

Conditional logic forms: ask the questions that apply

Plan form branches with explicit conditions and test changed answers, required fields, stored data, and notifications before handing them over.

ManageItGeneral

Conditional logic forms: Choose the condition; Show relevant questions; Test every branch.

Quick answer

  • Conditional logic shows or hides a form question based on an earlier answer, so customers see the details relevant to their request.

  • Write each rule explicitly, including what happens when the earlier answer is blank or changes.

  • Test the visible fields, required-field behavior, stored answers, and staff notifications for every branch. Hiding a field isn't an access-control measure.

A customer requesting a remote consultation shouldn't need to enter a service address just to submit the form. A customer requesting an on-site visit probably should. Conditional logic lets the same form handle those cases without showing everyone every question.

Your agency's work is to define the decisions clearly before building the rules. A short form with one understood branch is easier to maintain than a maze of conditions nobody can explain after handoff.

Start with one question that changes the next question

Consider this illustrative service inquiry:

  • The customer chooses On-site visit or Remote consultation.

  • Choosing On-site visit shows the service-address question.

  • Choosing Remote consultation shows the preferred-contact-method question.

  • The form always asks for the customer's name and a usable reply route.

The service choice drives the branch. The form isn't using a guessed customer profile or an inferred personal trait to decide what the person can see.

An illustrative form branch. Service selected: On-site visit; On-site branch: Ask for service address; Remote branch: Ask for preferred contact method; Before submitting: Check the final stored answers.

The GOV.UK Design System's conditional-reveal guidance gives a similar pattern: an answer reveals a related follow-up question. It also connects error handling to the revealed input. The principle is to show a relevant question when it becomes relevant, without making the form harder to understand.

Write the rule in plain language first

For every conditional field, record the controlling field, operator, expected value, and result. For example:

When “Service type” equals “On-site visit,” show “Service address.” Require the address only when that branch applies.

If several conditions apply, decide whether all must be true or any one is enough. “Service type is On-site visit AND location is within the service area” differs from “Service type is On-site visit OR location is within the service area.” The second condition would show the field to more people.

Don't use a text-contains check when a controlled choice would express the rule more reliably. “Contains visit” could match an unexpected phrase. With a choice field, you can test a defined value.

Keep an explicit path for “not sure” when uncertainty is a valid customer answer. The business can review those inquiries instead of forcing a false choice.

Test the answer changes, not just the happy path

Use this acceptance checklist:

  1. Choose each service option and confirm the intended fields appear.

  2. Leave the controlling answer blank and check the instructions and errors.

  3. Submit each valid branch with its required details.

  4. Omit a required visible detail and confirm the error identifies it.

  5. Fill in one branch, switch to another, and inspect what is ultimately stored.

  6. Confirm a hidden required field doesn't trap the customer on the other branch.

  7. Review the staff notification and any connected record for stale or contradictory answers.

  8. Repeat using a phone and keyboard navigation.

The fifth check is easy to miss. If a customer enters an address, then changes to a remote service, the business needs to know whether the earlier address is retained, cleared, or included in a notification. Don't assume that making it invisible also removes it from every downstream destination.

Apply the rules in ManageIt

ManageIt's conditional-logic guide describes equality, text, empty-value, and numeric comparisons, plus All and Any matching. It documents that conditionally hidden required fields don't block submission.

Use those supported rules to implement the planned branches, then check the actual submitted data and notification. The condition that controls visibility may differ from a condition that controls a notification or record-creation action. Review each one in its own context.

Keep sensitive information out of a general quote-request form unless the business has a justified need and an appropriate collection process. A hidden field is still part of a system; it isn't a secure compartment simply because the customer can't see it at that moment.

Leave the client a map of the form

Give the client a short rule register: field, purpose, controlling answer, visible result, required condition, storage destination, and test case. Name the person who should review the map when service options change.

Use the quote request form template to decide which questions belong in the form before adding conditions. The form design and acceptance kit includes a branch worksheet and the acceptance checks above, so the client can maintain the logic after launch.

The editable worksheets and templates include Markdown and CSV files you can adapt with the client.

Share

Written by ManageItGeneral at ManageIt

Keep reading

All posts

Set up your first
client account.

Build one client's forms, booking page, and quote templates on your domain, free for 14 days.