Learn how to use logic branches to create unique, personal experiences for each end-user of your Smart Form within FormHero Studio.
Your form doesn’t have to be linear — you can create different branches for respondents to follow. For example, you could ask different questions depending on where the respondent lives.
Insert a Logic Branch where you want to split the form into branches, then use conditions to determine when respondents are sent to each branch.
Tip Before adding a Logic Branch, make sure you’ve created the panels you want to use as branches.
The following form sends respondents down different branches depending on whether they want to create a new account, update their account, or cancel their account. After following one of these paths, respondents are taken to the Submission panel.
Create the first branch
1. Drag a Logic Branch from the sidebar and drop it before one of the panels you want to branch to.
2. The editor appears when you drop the panel.
3. You can’t do anything in the editor until you create the branches, so just click Apply. You’ll see that the Logic Panel has been added to the form.
Create the second branch
The Logic Panel is already connected to the panel below it, creating the first branch. Now you need to select a panel for the second branch.
1. Click the Logic Branch, then click CONNECT AS BRANCH.
2. Click the second panel you want to branch to.
3. The Logic Branch now contains two branches.
Create additional branches
You can continue adding branches to the Logic Branch.
- Click the Logic Branch, then click CONNECT AS BRANCH.
- Click the next panel you want to branch to.
Remove a branch
Before you can remove a panel from a Logic Branch, you need to connect it to a previous panel in the form.
In the following example, we want to remove the Cancel my account panel from the Logic Branch. Before removing it, we’ll connect it to the What can we help you with? panel.
1. Click the previous panel you want to connect to (What can we help you with?), then click CHANGE CONNECTION.
2. Click the panel you want to remove from the Logic Branch (Cancel my account), then click on a blank space in the workspace.
3. The panels are now connected.
Now we can remove the Cancel my account panel from the Logic Branch.
1. Click the connection between the Logic Branch and the Cancel my account panel, then click DELETE EDGE.
2. The connection between the panel and the Logic Branch is removed.
Label the Logic Branch
The default label for the Logic Branch is New decisionNode panel. You can change this to a more descriptive label.
- Click the pencil icon beside New decisionNode panel.
- Select the text New decisionNode panel and replace it with a new label.
Separate the branches
You should now have at least two branches connected to the Logic Branch. However, your branches are still connected to each other. In the following example, if respondents are sent to the Create an account branch, the form will also take them through the Update my account and Cancel account panels.
You need to remove the connections between the panels to create separate branches. You can then continue building each branch separately.
Remove the connections between branches
1. Click the connection between two branches, then click DELETE EDGE.
2. The connection between the two branches is removed.
3. If you have more than two branches, continue removing the remaining connections.
Add connections to a branch
In the following example, we want the Update my account panel to lead to the Submission panel.
1. Click a panel, then click CREATE CONNECTION.
2. Click the panel you want to connect to, then click on a blank space in the workspace.
3. The panels are now connected.
Add conditions to each branch
Use conditions to decide when to send respondents to each branch. Conditions can be based on the responses entered in any of the previous panels.
For example, suppose we ask respondents to choose an activity. If they select “Sign up for a new account”, we want to send them to the Create an account panel. If they select “Make changes to my account”, we want to send them to the Update my account panel. We would use the following conditions for these branches.
To create your conditions, add at least one condition to each branch.
Tip An error is shown at the bottom of the editor if a branch doesn’t have a condition.
1. Choose whether ALL or ANY of the conditions must be true.
2. Select + add condition and enter the following information.
Select a data binding
This is the data binding you want to check. In our example, we’ve used client.activity. This is the data binding for the Multi-checkbox question “What do you want to do today?”
Select an operator
Decide how to evaluate the data binding value. In our example, we’ve used is equal to.
Enter a value
Enter the value you’re checking for. In our example, we’ve used the values for the checkbox choices, Sign up for a new account and Make changes to my account.
Select this option if it doesn’t matter if the value contains uppercase or lowercase letters. For example, if you’re checking a value the respondent has typed into a Short Text field, you may want to ignore the case. This option isn’t relevant to our example so we haven’t selected it.
Select the default branch
Decide where to send respondents if none of the branch conditions are met. For example, the respondent may have skipped the question you’ve used for the conditions.
Use the In ALL other cases GO TO list to select the default branch.
Tip The default branch is labeled in the editor. (You may need to save the form to see the default label.)
Set the branch order
When figuring out which branch to use, the branch conditions are checked in the order they appear in the editor.
Sometimes you might want to check conditions in a specific order. For example, suppose you have two branches with conditions to check the respondent’s age. One branch checks if they’re under 25 and another branch checks if they’re under 35. It would make sense to put the “under 25” branch first. If the “under 35” branch is checked first, respondents under 25 would also meet the “under 35” conditions and be directed to the “under 35” branch.
To rearrange the branches, click beside a branch and drag it to a new location.
Save the Logic Branch
Save the panel
Important Do not click X in the top-right corner or the panel won’t be saved.Save your smart form
Be sure to save your smart form often so you don’t accidentally lose your work. Any unsaved changes will be lost if you close your smart form or your web browser.
1. Click SAVE.
2. Select the type of changes you’ve made (Major, Minor or Quick Fix)
3. Add a note describing your changes.
5. Click SAVE.