Navigation

Prerequisites

Show and Hide Fields with Conditional Logic

Ask only the questions that apply

Conditional logic lets a form react to what has already been answered. A question about team size only appears for businesses. A budget question only appears once someone has said they are ready to buy. A hidden field gets filled in automatically based on a choice made earlier.

The effect is shorter forms that feel more relevant, which means more of them get finished. It also means cleaner data, because you are not collecting answers to questions that did not apply.

Steps

Select the field the rule belongs to

In the form builder, click the field you want to control and find Conditional Logic in its settings panel. Switch it on.

The rule lives on the field being affected, not on the field being tested. To hide a Team size question unless someone chose Business, you set the rule on Team size.

This catches people out. Put the rule on the field you want to appear or disappear.

Add a condition

A condition has three parts: which earlier field to look at, an operator, and a value to compare against.

For example: Customer type — Is Equal To — Business.

The operators available depend on the type of field you are testing. Numeric fields offer comparisons, text fields offer contains-style checks, and every field offers Is Filled and Is Not Filled.

Add more conditions if you need them

You can add several conditions to a rule. Together they form one block, and the block's actions run when the conditions are met.

If you need two genuinely separate sets of circumstances to trigger different things, add a second block rather than stacking conditions into one.

Choose what happens

Add one or more actions to the block. There are six, described in the table below this step.

You only need to describe the positive case. When a condition stops being met, Zyntro reverses a show or hide automatically — so a rule that says show this field when X also hides it when X is no longer true. There is no need for a matching opposite rule.

Preview and test both paths

Use Preview Form and walk the form twice: once where the condition is met, once where it is not. Check the field appears and disappears as you intended, and that the form can still be submitted on both paths.

Always test the path where the condition is not met. That is where problems hide.

Operators

Operator Applies to True when
Is Filled Any field The person has entered or chosen something.
Is Not Filled Any field The field has been left empty.
Is Equal To Numbers and text The answer matches the value exactly.
Is Not Equal To Numbers and text The answer is anything other than the value.
Is Greater Than Numbers The answer is above the value.
Is Less Than Numbers The answer is below the value.
Contains Text The answer includes the value somewhere within it.
Does Not Contain Text The value does not appear in the answer.

Actions

Action What it does Typical use
Show Field Reveals a field that is otherwise hidden. Asking a follow-up question only when it is relevant.
Hide Field Removes a field from view. Dropping a question that no longer applies after an earlier answer.
Jump to Field Moves the person straight to a named field. Skipping a whole section that does not apply to them.
Set Value Fills a field in automatically. Populating a hidden field so the answer is recorded without anyone typing it.
Show Calendar Reveals the booking step. Only offering a booking to people who qualify for one.
Hide Calendar Removes the booking step. Withdrawing the booking option when an answer makes it inappropriate.

Warning: Never make a hidden field required. If a field is required and a condition keeps it hidden, the form cannot be submitted and the person gets no visible explanation — they simply click submit and nothing happens. If a conditional field must be answered when it is visible, check that every path through the form either shows it or does not need it.

Worked examples

On the Team size field, switch on conditional logic and add a condition: Customer type Is Equal To Business. Add the action Show Field pointing at Team size.

Individuals never see the question. Businesses do. You do not need a second rule for the opposite case.

Add a condition on What brings you here? — Is Equal To Just looking — and the action Jump to Field targeting the email field near the end.

Casual visitors give you a contact detail without being asked qualifying questions they are not ready for.

Add a hidden field called Enquiry type. On it, add a rule whose condition is Service required Is Filled, with the action Set Value writing something like service-enquiry.

The answer is recorded and can be mapped to the CRM, and nobody had to type it.

Add a condition on Budget — Is Greater Than your threshold — with the action Show Calendar.

People above the threshold are offered a time. Everyone else completes the form without one, and your calendar stays clear for conversations worth having.

Tip: Build the form first and get it working, then add logic. Adding conditions to a form whose fields are still moving around is how rules end up pointing at the wrong things.

Result

Your form now shows each person only the questions that apply to them. Because unanswered questions are simply not asked, the completions you get back are easier to read and the mapped data is cleaner.

Continue Reading

Was this article helpful?

NotebookLM Overviews