How To Add Branching Logic To Tilda Online Forms
How to build custom question paths based on visitors' previous answers using Tilda's online form blocks
Conditional visibility for fields in forms is the setting that allows you to show or hide a specific field depending on values in other fields, in other words, to create your branching logic. See an example →

Read this guide to find out what conditions you can add and how to set them up to add branching logic to your survey.
To start configuring, go to the "Input fields" tab of the Content tab of the block.
In the field card, click the "More: visibility conditions" button.
The "Visibility condition" setting will appear. Click the "Add condition" button.

How field conditions work

Once you've created the condition, choose whether it will hide or display a field. Then you can set up conditions.
In the first field "If in," select the field to compare the values. That is, if you've selected a string field, such as Email, all other conditions will analyze what the visitor typed in this field.

In the "Value" field, you should select the condition for comparison. For each field type, the comparison options will differ.

In the third field, you need to specify the value used for comparison, if available (text, number, interval values).

Configuring the conditions for different field types

For single or multiple-line input fields, it's possible to fully compare the value, check if the content matches partially (if it contains a certain value), or if the field is filled or left empty.

If the value is compared to another line of text, then the low register is applied to both strings making it case-insensitive, and extra spaces in the beginning and at the end are deleted.

If the multi-line text field is selected in the condition, then the low register is applied to the string making it case-insensitive, hyphen symbols are replaced with spaces, and extra spaces in the beginning and at the end are deleted.
For numeric values, you can check if the number is within a given range, is greater than or less than a certain value (with possible equality), or is within our selected interval between numbers.
For fields with answers to select, you can add the condition to check if the specified value is selected in the field. The "Question with image answers" field value can be validated by either a caption (if one is added) or by links to the image (if no caption is added).

That is, the fields with the same caption will be considered equal, and the condition will be applied if you choose any of these fields. For the conditions using this field to work correctly, you need to specify different photo captions or not to add them at all.
For the Checkbox or File fields, you can check if the checkbox is selected and if the file is uploaded.
You can add up to 50 conditions to one field.

If you add two or more conditions, the "Action conditions" setting appears — you can choose between possible options: All conditions required or at least one condition required.

What to keep in mind when editing online form input fields

  • When fields are moved up or down, duplicated, or reordered in the Contents block, the selection of available fields is updated. If the field used in the condition is no longer available after the order is changed, the condition is reset.
  • When a field is duplicated, all settings and visibility conditions for the field are also duplicated. If the field is turned off, it won't be included in the conditions.
  • When changing the field type, the conditions using this field will be reset to the default value for a new field type: No value is specified in those conditions.
  • If an empty value is specified in the condition, the condition is ignored.

How a form with conditions behaves on a published page

  • When submitting a form, fields hidden by conditions are not submitted. If a field is hidden by a condition, it is considered missing.
  • If a required field is hidden by a condition, it is considered missing and the form can be submitted.
  • If the "Show this field" action is selected and the condition is applied, then this field will appear in the same place where it is in the "Input fields" tab.
  • Conditions are used when the form has been initialized and changes in fields have been applied (the focus is removed, the Enter is clicked, etc.).
  • If a hidden field is included in the condition, such a field will not be displayed with the added condition. The conditions will only start working for it if the specified field in the condition is displayed on the screen. This is designed to make it easier to configure branches for conditional fields.
  • Usually, in online forms, clicking the Enter button after filling in the last field leads to the form submission. However, if new fields have been added to the form after any field's value has been changed (and conditions for these fields are completed), the next click on the Enter button will be blocked. This allows website visitors to view the form changes before submitting it.

How to work with the step-by-step form

If all fields for the question (or a survey step) are hidden, that question will be invisible. The hidden steps are not counted for displaying the counter and progress bar.

Form steps are recalculated after each modification of the conditional fields. The steps counter and the progress bar are recalculated together with the form's steps.
The buttons on the current step (Next, Back, Submit) are updated (in addition to recalculating steps). This is useful so that the last question/step may not be the last, depending on the logic.

The step-by-step branching form can be switched only between those steps that have visible fields.

An example of branching fields

Answer several questions to book a training session
Submit your contact information and we'll call you back with a personalized offer
What is your primary workout goal at the gym?
What kind of workouts do you enjoy the most?
What kind of workouts do you enjoy the most?
What kind of workouts do you enjoy the most?
Choose a strength and endurance coach
Choose a cycling and running coach
Choose a stretching and dance coach
How would you rate your fitness level?
When would like to visit the gym?
Below, a block diagram is included to illustrate fields branching in this example, you can zoom in on the image by clicking it.

Branching starts from the first question and continues to the second question.
Made on