Repeating sections are one of Cognito Forms’ most powerful features - and for several good reasons:
1. Collect unlimited data
When creating a form, you have no idea how many different products a customer might want to purchase, or how many guests someone might want to bring to your event. With repeating sections, you can put your form users in control and let them keep add as many repeating items as they want.
It just goes on and on and on.
2. Specify min and max
On the flip side, you might not want someone to bring an unlimited number of guests to your party. Another perk of repeating sections is that you can easily specify min and max limits for the number of items that a user can add. This way, the user still has limits - but with a little bit of wiggle room.
3. Total up items
You can use some simple calculations to perform a ton of helpful functions on your repeating sections. For example, let’s say you have a summer camp registration form, and you want to create a discount based on the number of campers that register.
First, we can create a Price field that sums the total price of all the camper registrations combined. To do this, just multiply the registration fee (in this case $15) by the number of camper repeating sections, which is expressed as Form.Campers.Count():
(Don’t forget that you also have the option to edit the description that appears next to the item in the payment summary!)
Next, we’ll create another Price field to calculate the group discount:
In this calculation, we’re using an if/then statement to subtract 20% from the registration fee total if the number of campers is greater than 2:
=if Form.Campers.Count() > 2 then - RegistrationFeeTotal*.20 else 0
Now, a 20% discount will be applied then the user registers 3 or more campers:
4. Group line items together
On forms with payment, items in repeating sections will automatically appear grouped together in the payment summary. This orderly grouping makes the final payment very easy for customers to quickly review.
5. Convert them to a table
With the new Table field, you can easily convert your repeating sections into a grid format with columns and rows, keeping your field data more organized and concise:
6. Keep your form lookin’ good
Last, but certainly not least: having a bunch of extra empty spaces on your form is not very visually appealing. Repeating sections serve not only a functional purpose, but an aesthetic one as well; they keep your form looking more simple, clean, and streamlined.
Have any questions about repeating sections, or Cognito Forms in general? Contact us today!