Cognito Forms logo

Repeating Section

A Repeating Section is a container used to group a set of fields that repeats as needed, allowing the user to add multiple instances of the section to the form. Repeating sections can also be converted to table fields when necessary.

Label

The label will display as the title of the field or the question that is being asked on the form. It is not recommended to leave the label blank because the label will be used as the column heading in Excel when form entries are exported.

Item Label

The “Item Label” is the title of each repeating section followed a number to indicate how many repeating sections the user has added. 

Help Text

Help text can be used to assist the user by providing additional instructions. Help text will display directly under the field.

Number of Items

Set the minimum and maximum number of items that your users can add to a repeating section. Use static numbers such as "1" and "5", or set calculated limits based on other fields. The minimum limit is the default number of items that appear when a form initially loads. When a minimum of zero items are set, the fields in the section will not appear until the user adds them.

 Visit our blog to see examples of how you can use repeating section limits.

Show This Field

By default, fields will always display on the form. However, you may want to hide specific fields or sections based on certain conditions such as a selected value of another field on the form.

  • Always - Field is always shown.
  • When - Field will only display when specific conditions are met. After selecting this option, the Conditional Logic Builder dialog will display allowing you to select when the field or section should be displayed.
  • Internally - Field will not display on the public form and will only display when a Cognito Forms user is editing the form from the Entries page.
  • Never - Field will never display.

Custom Error

You can set a custom error message that will display under your field when specified conditions become true. The conditional logic builder will allow you to add any number of rules for validating your field. Learn more about the custom error option.

Referencing repeating data

Because repeating sections collect a potentially unlimited amount of repeating data, you cannot directly reference a field inside a repeating section, as the form does not know which specific iteration to reference. However, you can easily target repeating field data with a simple calculation; for example, if you wanted to reference a Name field inside of a repeating section:

1. Add a Calculation field to your form (outside of your repeating section). Make sure to set this field to Internal view only.

2. Use the following expression as your calculation:

=RepeatingSection.Select(Name)

Here, we're just referencing the title of your repeating section ("Repeating Section"), following by the label of your Name field.

3. Now, the Calculation field will compile a list of Names based on each repeating section entry:

You can even reference a field from a specific entry by specifying the item number:

=RepeatingSection.Where(ItemNumber = 1).Select(Email)

In this case, only the email field data from the first repeating entry will be targeted. If you set this calculation as the default value of an Email field placed outside of your repeating section, you could then reference this email in the From address of your email notifications, or the To address of your email confirmations.

Printable View