How to use conditions to calculate payment in a form with multiple registrations
Conditions can be added to different fields on a form to affect the functionality of other fields.
In this article, we will use the example of creating a registration form for multiple students for a Religious Education program, with the addition of a payment field to calculate the registration fees.
We want the form to accommodate multiple registrations, but also wish to hide the registrations for student 2 and 3 if a family is only registering a single student.
1.) After you have created all the fields you need for your form (Registration fields for Student 1, 2 and 3) you will go back to the fields you wish to hide to add conditions. In this form, I've created an Item Radio button(s) field at the start that asks how many students are being registered. It is a required field, and it will help us setup how many registration fields will show, as well as how much is due at the bottom of the form.
2.) We'll start with Student's Name (2nd Student) by clicking the gear icon to the right of the field.
3.) The Field Properties window will pop up. For any field that doesn't have to be filled out in order for a form to submit, we have to make sure that it is not marked as "Required". To do this click on Validation.
4.) Make sure the checkbox next to Required is not checked. Then click on Conditions to move forward with adding conditions to this field.
5.) Once in the Conditions section, make sure the radio button for Under Certain Conditions is selected.
6.) A new field will show up in the window that will allow you to add conditions. Click on Add a Condition.
7.) A new condition is now available for edit. Click the drop-down menus to select any of the available fields in the form to use as a condition.
In this case, we only want the fields for Student 2 to show if someone checks the Radio button for registering 2 students. Which would look like this:
But for the fields that are only for the 3rd student it would look like this:
8.) Once you're finished adding your conditions, hit the X in the top right of the conditions window to close it and take you back to the form.
9.) Repeat this process for each field in the form. If you have four fields each for the 2nd and 3rd Student information, you will need to open the options for each field and enter in the relevant conditions. That means you will be entering conditions for the 2nd student 4 times and for the 3rd student 4 Times. Once for each field that is dependant on that condition.
10.) Once you're finished adding your conditions, you can go to Preview Form to test your conditions.
11.) In the Form Preview, try clicking on the Radio Button for 2 Students - $20.00.
12.) If you scroll further down the form you will see that only registration fields for two students are now showing up.
And the subtotal at the bottom of the form is showing the correct amount:
And that is how you set up a form with conditions and payment fields.
Related Articles:
How to use Form Conditions (No Payment Fields)