Conditional logic takes people on a unique path through your forms. Whether you want to show and hide certain fields, allow customers to pay now or later, or route emails to certain users at specific times, there are many ways to keep your forms streamlined and efficient.
Showing and hiding fields or sections
Some questions on your form may require additional information, but you’d rather not overwhelm people with extra fields that they don’t need to complete. With conditional logic, you can automatically show and hide fields or sections depending on what people select. To show and hide fields:
- Select the field you want to show and hide, and find the Show This Field - When option in the field settings.
- In the conditional logic builder, specify the conditions that will trigger the field to appear.
- Make sure to save your changes.
Showing pages on multi-page forms
When your form has a lot of pages, you don’t want to confuse your users by showing them pages they may not need. Usually that would mean you’d need to build a separate form, which takes too much time and separates related data. With conditional page branching, you can send each of your users on a completely different path depending on what they answer. To conditionally show a page:
- Add a page break, then select When from the Show Next Page section in the field settings.
- In the conditional logic builder, you can set the page to only be visible when the user selects a specific option in the Choice field, ex:
=WhichPositionAreYouInterestedIn = "Sales Director"
- Now, the “Sales Director” page only appears when the user selects Sales Director from the drop-down list.
Learn more about multi-page forms.
Control who gets notified and when with email routing. For example, set notification emails for a contact form to send to different people depending on the department the user selects. Or, send a confirmation email to update your users when their submission has been approved. To set conditional notifications:
- From the Submission Settings section in your form builder, select either Notification Emails or Confirmation Emails.
- Specify who’s receiving the email, the subject of the email, and optionally include a custom message.
- Choose between the “Send When Submitted” and “Send When Updated” options.
- Send When Submitted will send emails when an entry is submitted.
- Send When Updated will send emails when an entry administrator edits and saves an existing entry.
- Specify the criteria that should trigger the email to send.
Learn more about email routing.
Text piping (also known as “question piping”) allows you to carry user input from one field to the next depending on the options they select. You can use text piping to create more dynamic, personalized forms with focused follow-up questions. For example, personalize your survey forms by asking customers specific follow-up questions that reference earlier fields on the form. To set up text piping:
- Add a Choice field to your survey form labelled ‘Which product do you use the most?’
- Create a follow-up Choice field. In the field settings, use the Insert Field option to insert the answer from the previous Choice field into the field label, ex: ‘You selected
[WhichProductDoYouUseTheMost]! Please rate this product.’
- Set the follow-up Choice field to only appear after the previous Choice field is filled out, ex:
=(WhichProductDoYouUseTheMost != null
- Now, when the user selects their most used product, the product name will automatically populate in the next field:
Require payment now or laterDetermine the circumstances in which your customers are required to pay. If you want to give your customers the option to pay now or later, simply add a choice field with conditional logic. When they select Pay Now, the payment will become required. When they select Pay Later, they can just submit their order without payment.
Set your fields as always, never, or sometimes required under specific conditions to make sure you get your data when you need it. For example, when a user specifies that they would like to pick up their delivery, create a Phone field so you can notify them when their order is ready — and the field is only required and appears when they choose Pick-up. To require a field:
- Go to the field settings box of the field you want to require, and find the “Require This Field” option.
- Set the the conditions under which the field needs to be required, ex:
=IsYourOrderForDeliveryOrPickup = "Pick-up"
- The selected field will now only be required under those exact conditions.
With the Custom Error option (located in the settings area of almost every field type), you can specify certain conditions that will cause a custom error message to display underneath a field. Using both advanced and conditional logic, you can add any number of rules for validating your fields. To set your own custom error rules:
- Select the field you want to validate, then find the “Show Custom Error” option at the bottom of the field settings box.
- After the conditional logic builder appears, set the conditions under which you want your field to result in an error.
- After you set your conditions, include a error message in the second box.
Learn more about the Custom Error option.