Balbooa Joomla Forms Builder allows you to add conditional logic that makes your Joomla forms simple and personalized. In this tutorial, we will show you how to use conditional logic in Joomla forms.
Let's see how Conditional Logic works on the example of Callback Form. Suppose you need to find out which way is better to contact the user by phone or email.
When “Email” is selected in the field “What is the best way to contact you?”, displaying the “Email Address” field for filling. If the “Phone” is selected, displaying the fields for filling in “Phone Number”, “Date”, “Time”.
To do this, we created a Callback Form with the following fields and labels:
Field Label |
Form Field |
---|---|
Name |
Input. Type: Text Input |
What is the best way to contact you? |
Radio. Item: Phone, Email |
Phone Number |
Phone |
Email Address |
Input. Type: Email |
Date |
Calendar |
Time |
Input. Type: Time |
1. Click the icon “Conditional Logic” in the left sidebar.
2. Add New Rule:
3. Add New Rule:
Add New Action ➝ Click Action and select "Show Field" ➝ click Field and choose "Date".
Add New Action ➝ Click Action and select "Show Field" ➝ click Field and choose "Time".
4. Save, display the form and test Conditional Logic.