Conditional Logic in Forms With Five Practical Examples
Conditional logic means the form changes based on what a person answers. These five examples show where it helps most, each with the condition that triggers it and the effect it has.
Article
How a rule is built
Every rule has the same two parts. The condition looks at an answer, for example Do you have a promo code equals Yes. The effect says what happens when the condition is true, for example show the Promo code field. FormsBuilder supports four kinds of effect: show a field, skip a step, change the price and send the submission to another person.
Conditional logic is included in every plan, starting with Starter at 49 USD per month. Keep the idea of condition and effect in mind and the examples below will look very similar to each other.
Example one, show a field only when it applies
Condition: the answer to Do you have a promo code is Yes.
Effect: the Promo code text field appears.
Without the rule, every visitor sees a promo code box and some wonder whether they are missing a discount. With the rule, the form stays short for everyone else. The same pattern works for Other, please specify next to a list of options, for a Company name field that appears only when the person selects Business account, and for a Delivery address block that appears only when the person chooses Ship to me instead of Pick up.
Example two, skip a whole step
Condition: in an application form, the answer to Current employment status is Not employed.
Effect: the Employer details step is skipped.
Employer name, job title and manager contact are irrelevant to an applicant without a job. Instead of leaving them blank or forcing invented answers, the applicant moves straight to the next relevant screen. The progress bar adjusts to the steps that remain. This is the most useful rule in long forms, because it removes an entire screen rather than one field. It suits tax questionnaires, enrolment forms and onboarding forms where a section applies to only some people.
Example three, change the price
Condition: in a booking form, the Extras checkbox Airport pickup is ticked.
Effect: 35 USD is added to the total.
Say the base service costs 120 USD. A customer who adds Airport pickup sees a total of 155 USD before the payment step, and a customer who adds nothing sees 120 USD. A second rule can do the opposite: if the number of guests is 4 or more, take 10 USD off the total. Because the price changes while the person is still filling in the form, there is no surprise at checkout and no invoice correction afterwards. Payments are available on the Plus plan at 149 USD per month and on Pro. The guide to taking payments in online forms shows how to place the payment step.
Example four, route to the right person
Condition: in a contact form, the answer to Topic is Billing.
Effect: the submission goes to the finance mailbox instead of the general inbox.
Add more branches and the form routes by topic. A message about billing goes to finance, a message about a project goes to the account manager, and a message about a job application goes to whoever handles hiring. The sender fills in one form with one Topic dropdown, and nobody on your team forwards emails by hand. You can also route by value. In a quote request, an expected budget above 10,000 USD can go to a senior salesperson, while smaller requests go to the shared queue. The contact form builder page shows a full layout for this.
Example five, require a signature only when needed
Condition: in a consent form, the answer to Do you agree to the optional photo release is Yes.
Effect: the Signature field becomes required.
Everyone else submits without a signature, which keeps the form quick for most people. Those who agree sign with a finger on a phone or with a mouse on a computer, and the signed submission is stored with a PDF copy. The same rule fits a waiver that applies only to a high risk activity, or a contract addendum that matters only when a customer selects an extended service. Signatures and PDF copies are part of the Plus plan.
Combining rules
Rules can work together. A booking form could show a Guest count field when the person selects Group booking, add a 15 USD charge per guest above six, and send the submission to the events coordinator whenever the guest count is above twelve. Each rule is simple, and together they make the form behave like a short conversation. Build them one at a time and test each before you add the next.
Tips for clean logic
- Keep rules simple and test every path in the preview
- Name fields clearly, for example Employment status instead of Question 7, so rules stay readable
- Avoid hiding required information behind long chains of conditions
- Prefer a choice field over free text as the trigger, because a fixed list of answers is easier to match
- Check the mobile view, since a field that appears below the fold can be missed
- Review old rules whenever you change a question, so a renamed answer does not leave a rule pointing at nothing
Read more on the form builder with conditional logic page, or see how steps and rules fit together in the multi step form builder.
Set your first rule
Pick a field, choose a condition and decide what happens. Start with the demo and switch on Add conditional logic. When you are ready to keep the form, compare plans on the pricing page.