Introduction
Hello, and welcome back!
Let's continue talking about the advanced features of the form builder in StudioHub.
In this video, we're going to talk about a feature called "conditional logic".
First, I'm going to explain what it is, and then I'm going to walk you through an example of how to use the "conditional logic" feature.
Just a heads up - What I'm going to teach you can feel very technical for some of you watching. Stick with me as I'll try to make it really simple to follow.
Let's begin.
What is "conditional logic"?
To explain what the "conditional logic" feature is, and what it does, imagine the following scenario.
Think of someone who is filling out a form. As they are inputting their information, they check a button, and new fields come up.
For example, imagine the form had the question in it: "Do you want to refer a friend?". Then, if the person checks the button saying "yes", the form shows more fields asking for that friend's name, phone.
{{SHOW EXAMPLE}}
Another example could be a new inquiry form for a business that teaches kids classes. Imagine this form has the question in it: "Do you have another student?". Then if the person checks the "yes" button, it will reveal a field that asks for the second's students name, and age.
To do those things, you need to use the "conditional logic" feature.
In essence, conditional logic allows you to say "If this happens", "then, do this...".
Like in the examples above, if the person clicks a certain button, then the form will show them these other fields of information.
Form before conditional logic
Now, let me show you how to use the "conditional logic" feature in the form builder.
Take a look a this form.
Look at the different fields inside of it.
Notice the custom fields asking "do you want to refer a friend?"
{Show form with the custom fields}
Here's what I want to do: we're going to recreate the example I first gave you. When someone who is filling out this form selects the answer "yes" to the question "Do you want to refer a friend?" I want to show them the 3 more fields, friend 1 name, friend 1 phone, and another question "do you want to refer another friend?"
Let me show you how to build this.
Creating "Conditional Logic"
To create the conditional logic, you first need to be inside the form editor for the form that you want to edit.
From here you want to click on the "conditional logic" icon on the top left corner.
You can see here all the things you can do with conditional logic.
{Go through the examples of the different types of logic you can build}.
For this example, I'm going to click on "Show/Hide Fields"
For the "if" part, I'm going to pick "Do you want to refer a friend?"
Then, I'm going to pick "is equal to"
In the last box, I'm going to select "yes"
Then, I'm going to change the "hide" to "show", and I'm going to select the fields that I want to show.
Then, I'm going to repeat the same steps for the question "Do you want to refer another friend?"
Test it
Once I complete adding all the conditional logic, it is time to test it.
Notice what happens when I click the button "yes".
{Show the form in action}
Again, the same thing can be done if you have a business that focuses on teaching kids.
You can have the form show the option to add more students if they click "yes" on a question that says "do you want to add another student?".
This can be useful for parents who have multiple children.
Custom fields
Although I didn't show it here, I created these custom fields ahead of time.
"Custom fields" let you capture any information that you like inside the forms.
If you want to learn how to create them, there's a training on them that you can watch after you finish watching this training on forms.
I'll include the link to that training below this video at the bottom of the page.
I wouldn't recommend skipping to that training now as there is still more information in the FAQ section of this training that you still need to learn.
So finish this training before you head on over to that one.
Conclusion
That's it! you know now how to use the advanced conditional logic feature in the form builder.
One of the benefits of this feature is that it makes your form smaller, and less daunting to fill out, as opposed to seeing a huge form when you first see the form.
Again, this is not a feature we support, but you are welcome to play around with it if you have any ideas that you can think of for using this feature.
Hope this helps!
I'll see you in the next video!
"Custom fields" training: https://getmorestudents.freshdesk.com/support/solutions/73000350737