Overview
A repeating section is a section of a form that users can duplicate as many times as needed when filling out the form. This is useful for data collection that requires the same set of questions to be answered multiple times, such as in surveys, inspections and audits.
When your repeating sections involve a value that you want to add/sum (e.g., score, price, quantity), you can add this simple script in the Form Builder: sumSection($section_key$, 'field_key')
How to Sum Values Across Repeated Sections
- Create a repeating section for your form in the Form Builder (if you haven't already).
- Select the blue Pages/Sections of your form to add a section.
- Select the pencil icon next to the section and select Enable Repeating Sections.
- After setting up your repeating section, add a Calculation field to your form.
- Select Add Calculation under the settings menu on the right and enter the following script in the Calculation Formula box: sumSection($section_key$, 'field_key')
- Replace section_key with the name of your section's field key.
- Be sure to keep it surrounded by the dollar symbol ($).
- To find your section's field key, refer to the screenshots below:
- Replace field_key with your field key that you want summed.
- Be sure to keep it surrounded by single quotation marks (').
Now, your form respondents will be able to repeat the section as needed, and the values they enter for each section will be added together automatically. The total will appear on the calculation field of your form.