The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Controlling number of repeatable fields based on another field's value

Labels

This Discussion is public

Notifications

This was my issue:

I have a registration form that I need to be able to have people add other users with a significant repeating section. But I need to calculate the total based on how many people are registering. My former solution was to add a "total number of people" field and force the registrar to add the number of how many people they were registering - but there was room for error, and the big issue was that they didn't HAVE to enter each person in order to submit. I need every person's info, so that wasn't going to work.

Here is my solution (see below for the exact documentation I used):

Inside the "repeater" section, I created a hidden number field (showing only to the administrator) and told it to to equal "1".

Then I created a second text field (also hidden) OUTSIDE the repeater section and I calculated the value based on my hidden number field in the repeater section.

It automatically adds the number of people who are added just like I want.

Then I used another text field to calculate my total.

 


https://formidableforms.com/knowledgebase/repeatable-section/#kb-total-a-field-inside-a-repeater

Total a field inside a Repeater#

To get a total of the values in a field in a Repeater, you can:

  1. create a field outside of the Repeater to hold the total
  2. in the Dynamic default value box, check the Calculations checkbox
  3. in the Calculations box, put the [id] or [key] of the field inside the Repeater that you want to total

The values in the field in the Repeater will be added together automatically. If the values in the Repeater are words instead of numbers, you can check the text calculations checkbox, too. The total field will contain a comma-separated list of the values in the field in the Repeater.

Discussion closed.