One of our favorite things to see is when a customer combines a couple of our perks together to create a form that saves them and their users time. The following tutorial is one of those occasions. A customer wrote into Support with a question about their form and when I tested it I said to myself, “This is really clever!” That inspired me to write this tutorial so I could share what I learned.
Let’s dive in.
In this tutorial, we’re going to create a single form that performs multiple functions:
- Register multiple players on a team.
- Adjust each player’s registration fee based on the player’s age.
- Process the entire registration in a single form submission.
To accomplish this, we’re going to combine a couple of our Perks:
Try this demo to get a feel for how it works.
- Create the Players Form
- Calculate Age
- Set up Conditional Pricing
- Create the Team Form
- Calculate the Registration Total
Create a new form and name it “Players”. Add the following fields to the form:
Name the Date field “Date of Birth”. If you want to limit the age of the players for the team, check out GF Limit Dates.
We’ll calculate each player’s age in the Number field using GF Date Time Calculator. Check the Enable Calculation checkbox and insert the merge tag for the “Date of Birth” field. Add the :age merge tag modifier to it to automatically calculate age.
With age calculation in place, we can use GF Conditional Pricing to set up pricing based on the player’s age.
With the Players form completed, it’s time to set up the Team form. Add a Nested Form Field to the form and select the Players form.
Add a Product field to the form, set the Field Type to Calculation, and use the :total merge tag modifier to total up the player registration fees from the Nested Form.
With this last step completed, we now have a form to register a team with a full player roster that will automatically adjust the price based on a player’s age. It’s easy for a user to submit an entry and all the heavy lifting is handled with a handful of Perks.
Taking It Further
The Conditional Pricing in this form is dependent on the value in the Age field. If the value in this field is changed, the price changes. To prevent this, either set it as hidden or use GF Read Only.
You can set an age limit for your teams with GF Limit Dates. Set a minimum or maximum date range to prevent players that are too young or too old from joining the team.