Conditional logic

Conditional logic enables you to create dynamic form paths that guide respondents to relevant pages based on their responses.
 
notion image
 
Conditional logic is available for free to all Tally users.
Conditional logic is available for free to all Tally users.
 


 

Conditional logic examples

Conditional logic is a versatile tool that allows you to create tailored form experiences based on user responses. Some examples of using conditional logic include:
 

How to create logic

Type /logic to add conditional logic to your form. You can add conditions on any type of input block. Click : next to the logic block to remove, duplicate, add new, or wrap conditions in a group.
 
notion image
 
Use the cmd/ctrl + shift + L shortcut to add a conditional logic block under a selected input block.
Use the cmd/ctrl + shift + L shortcut to add a conditional logic block under a selected input block.
 

Actions

After adding a conditional logic block to your form, you can select from six types of actions to trigger. You’ll find them in the Then dropdown.
 

Jump to page

Jump to page enables you to skip pages with questions that don't concern your respondents or to redirect them to a different Thank you page.
In the example below, the Jump to page is configured to redirect respondents under 18 to page 3 rather than continuing with the rest of the form flow.
 
notion image
 
It’s important to place the conditional logic block on the page where you want the jump action to trigger. The jump will only trigger when respondents click the “Next” or “Submit” button.
It’s important to place the conditional logic block on the page where you want the jump action to trigger. The jump will only trigger when respondents click the “Next” or “Submit” button.
 

Rename pages

Renaming your pages makes it easier to identify your pages when installing page jumps in a lengthy form with a lot of pages. You can rename a page by clicking the page number.
 
notion image
 

Calculate a value

With calculated fields, you can use your respondents' answers to calculate (and display) scores, prices, or other values.
 
Calculations on date blocks are not available yet.
Calculations on date blocks are not available yet.
 

Make answers required

The Require answer option allows you to set a form field as required or not, depending on the respondent's input. For example, if a respondent wants to sign up for your newsletter, make the email input field required.
You can use the keyboard shortcut to make selected questions required:
ctrl/cmd + shift + R
You can use the keyboard shortcut to make selected questions required: ctrl/cmd + shift + R
 
notion image
 

Show or hide blocks

You can show or hide one or multiple questions or answer options depending on your respondents’ answers. In the example below, an extra field will only show when the respondent answers ‘Other’.
 
notion image
 
You need first to create the hidden block. In the example, we used a short answer block. You can add it by typing /short. Then, click ⋮⋮ to open the block settings and click Hide.
Use the keyboard shortcut to hide selected blocks: 
ctrl/cmd + shift + H
Use the keyboard shortcut to hide selected blocks: ctrl/cmd + shift + H
 
notion image
 
To hide multiple blocks at once, simply drag to select them and open the block settings to hide all the selected blocks.
 
notion image
 
For the final step, Insert Conditional logic and choose the action Show or Hide blocks. Click the question title to select or de-select grouped blocks at once.
 
notion image
 
You can also hide answer options from multiple-choice questions, checkboxes, and dropdowns by following the steps above.
You can also hide answer options from multiple-choice questions, checkboxes, and dropdowns by following the steps above.
 

Hide button to disable completion

Using Hide button to disable completion, you can prevent respondents from submitting your form by hiding the submit button.
 
notion image

Redirect to different URLs and Tally forms

You can redirect respondents to different websites, landing pages, or Tally forms upon form completion. For this, you’ll need to use conditional logic and calculated fields.
You can also add hidden blocks to allow respondents to enter additional information before leaving the form for more comprehensive and trackable lead capture. As a result, the form creates an interactive landing page-like experience.
To learn more about redirecting to different URLs, read our redirect on completion guide.
 
notion image
 

Troubleshooting

When dealing with long forms, conditional logic can become more intricate and prone to logical errors. With extensive fields, conditions, and actions, it's crucial to be cautious, as even small mistakes can sneak in. To effectively troubleshoot your form, you can follow these general steps:
  1. Review the conditional logic blocks: Start by carefully examining the conditional logic rules you've set up for your form. Check if the conditions are linked to the correct fields and actions. Ensure that you have configured the logic correctly based on your specific requirements.
  1. Edit field names: Replace the default question field names with descriptive titles that accurately describe the question or information being collected. This will make it easier to identify and manage fields when setting up or troubleshooting conditional logic.
  1. Test your form: Before sending your form to respondents, test different scenarios. You may find it easier to spot any errors by doing several test runs and selecting different answer options each time.
  1. Use @ mentions to identify the specific issue: By strategically placing @ mentions before or after the conditional logic block, you create a mechanism to track the values of relevant inputs and calculated fields at specific points in the form's execution.
  1. Simplify to narrow down the problem: By reducing the complexity of the logic, you can isolate specific conditions or actions that may be causing the issue and focus your efforts on debugging those areas.