๐Ÿ”’ EXCLUSIVE: Knowledgebase/repeatable section - Full Archive

Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

Repeater

Use a Repeater field to add a group of fields any number of times. This field allows users to click an Add button to add another group of fields. This field is incredibly useful if you would like users to add details about multiple items in a form. This feature is commonly used when adding information for multiple individuals, such as children, in a form.
Repeater field front-end

Standard Field Options

A Repeater field has the following standard options:
Repeater field OptionRepeater field Option

 

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Field-specific options

— Premium Feature —

Collapsible

If you would like your section or repeater to slide open or closed, you can select the Collapsible checkbox option.

To learn more about collapsible sections, click here.

Repeat Layout

With the Repeater, you can choose the layout you would like for the fields within that section. To set the layout, go into the Field Options setting and select the Repeat Layout that you would like.

The Inline format will display all the fields in the Repeater on one row. The Grid format will display all the fields in the Repeater on one row with the field names only on the top of the first row.

Repeat Buttons

By default, the repeat buttons will show a (+)(-) symbol as well as the Add/Remove text. The text can be changed to whatever you would like, or you can remove the text altogether and only have the (+)(-) symbols. Alternatively, the (+)(-) symbols can be removed so you only see text on the Add/Remove buttons.

  1. Click on the (+)Add (-)Remove button inside the Repeater.
  2. Set your Add New Label and Remove Label text.
  3. Choose if you would like to have Icons, Text links, or Text links with icons for the Repeat Links option.

Maximum Repeater Rows

Set the maximum number of rows a user can add in a Repeater field. If no value is set, it will allow users to submit as many rows as they want. It needs to have a value of at least 2 to trigger this function.

Minimum Repeater Rows

Set the minimum number of rows displayed in a repeater when the form is initially loaded. If no value is set, only one row will appear by default. It needs to have a value of at least 2 to trigger this function.

Set up a Repeater Field

  1. Add a Repeater field by clicking on Repeater in the Fields Panel (in the right sidebar).
    Add a Repeater field
  2. Drag and drop the field(s) that you would like into the Repeater.
    Repeater Drag and Drop
  3. Now you can customize the layout of the repeat rows or change the repeat buttons.

Set up Repeater action

By default, every form action is triggered based on the events of the main entry, such as entry creation, saving, updating, and deletion. With the repeater action, you can trigger specific actions based on the entries in the repeater. Below is a list of supported form actions.

  • ActiveCampaign
  • API
  • AWeber
  • Campaign Monitor
  • Constant Contact
  • GetResponse
  • Google Sheets

This guide will walk you through using the Repeater actions with the Send Email action as an example.

  1. Begin by creating the required repeater fields in your form.
    Add repeater fields to form
  2. Navigate to your form Settings and access a form action. Then, configure it to trigger based on your selected repeater.
    Repeater form action settings
  3. Add the necessary data for the email message, considering the repeater entries. In this example, the custom email will only be sent out if a value is submitted to the selected repeater.
    Run this repeater form action
  4. Submit some new entries for the repeater.
    Submit entry to repeater action form
  5. Once you have submitted the entry, you can check your email inbox to see the entry results of the Send Email action. It will vary depending on which repeater you have triggered it to run.
    Show entry results of repeater form action in email

Repeater field styling

To customize the default styling for Repeater fields, go to Formidable → Styles → Repeater Fields. Select the icons and icon color that you would like to use for your add/remove buttons.
Repeater Styling

Repeater button color

To customize the Add/Remove button colors, go to Formidable → Global Settings → Custom CSS page or your form's style custom CSS area and add the following CSS. You may adjust the background-color and border-color as needed.

.frm_repeat_sec .frm_button {
    background-color: #5bcd5d !important;
    border-color: #5acc5c !important;
}

Repeater button order

To customize the order of the repeater buttons, go to Formidable → Global Settings → Custom CSS page or your form's style custom CSS area and add the following CSS.

.frm_repeat_buttons.frm {
  direction: rtl;
}

Add columns in a repeater field

Since section headings can't be used inside a repeater, you could create a two-column layout by following the steps below:

    1. If you want to create a title similar to a Section Heading field, you can add two HTML fields for each column inside a repeater.
      <h3>Section Title</h3>
    2. In the CSS layout classes box, insert frm_first frm_half for the first HTML field and frm_half for the second HTML field.
    3. Add the other fields that you want in the first column below the HTML field. Set the CSS layout class to frm_first frm_half.
    4. Add the fields that you want in the second column below the HTML field. Set the CSS layout class to frm_half.
      Repeater Column Layout

Note: This can also be done without the HTML field, if you don't want a heading title.

Get the total of the values from Repeater fields

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 Default value settings, toggle on the Calculate Value and select the Math option.
  3. In the Field Formula box, insert 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 select the Text option, too. The total field will contain a comma-separated list of the values in the field in the Repeater.

Calculate the number of rows in a repeater

To calculate the number of rows in a repeater, follow the steps below:

    1. Inside the repeater, add a hidden field to hold the row number.
      Repeater Calculate Number of Rows
      In the Default value box, set the default value to 1.
      Repeater Calculate Number of Rows Hidden Field
    2. Outside the repeater, add a text or number field to hold the total number of rows. Under the Default value settings, toggle on Calculate Value and select the Math option. Then insert the Hidden field ID in the Field Formula box.

Repeater Calculate Number of Rows Total Field

The values in the hidden field in the Repeater will be added together automatically to calculate the number of rows.

Displaying Repeater Fields

Display the value submitted in a Repeater field by inserting the shortcodes into a View or email.

  • Display submitted options. In emails and Views, you'll see values from Repeater fields grouped by field.
    Name: John Smith, Julie Roberts, Rob Darlington
    Meal: Pepperoni pizza, Fettucine alfredo, Pepperoni pizza
    Drink: Dr. Pepper, Water, Coca-Cola

    When you use the field shortcodes like this:

    [101 show="field_label"]: [101] 
    [102 show="field_label"]: [102]
    [103 show="field_label"]: [103]

    Replace 101, 102, and 103 with the field IDs inside the Repeater.

  • Separator. Apply a separator between iterations.
    Dr. Pepper, Water, Coca-Cola

    When you use the foreach shortcode like this:

    [foreach 100 sep=", "][103][/foreach 100]

    Replace 100 with the field ID of your Repeater field. Replace 103 with the field ID inside the Repeater.

Alternatively, you may create a View from a Repeater field. A View from a Repeater provides ordering and filtering options that the [foreach] shortcode, in a View from the main form, does not. A View from a Repeater could be standalone or nested inside a View from the main form.

Display data grouped by row

If you would like to display the data from a Repeater field grouped by row, like this:

John Smith: Pepperoni pizza, Dr. Pepper
Julie Roberts: Fettucine alfredo, Water
Rob Darlington: Pepperoni pizza, Coca Cola

you can use the foreach shortcode like this:

[foreach 100]
[101]: [102], [103]
[/foreach 100]

Replace 100 with the field ID of your Repeater field. Replace 101, 102, and 103 with the field IDs that are inside of the Repeater.

Display data in a table

You can also use the foreach shortcode to display the repeater fields in a table:

Name Meal Drink
John Smith Pepperoni pizza Dr. Pepper
Julie Roberts Fettucine alfredo Water
Rob Darlington Pepperoni pizza Coca Cola

Use the code below to create a table with the foreach shortcode:

<table>
<tr>
<th>[101 show="field_label"]</th>
<th>[102 show="field_label"]</th>
<th>[103 show="field_label"]</th>
</tr>
[foreach 100]
<tr>
<td>[101]</td>
<td>[102]</td>
<td>[103]</td>
</tr>
[/foreach 100]
</table>

Replace 100 with the field ID of the Repeater field. Replace 101, 102, and 103 with the field IDs that are inside of the Repeater.

Display data in reverse order

To display the data from a Repeater field in reverse order, you can use the parameter order="desc". It will iterate through the repeater entries, starting from the oldest entry and ending with the most recent one.

[foreach 5651 order="desc"]
[5653]
[/foreach 5651]

Replace 5651 with the ID of your Repeater field. Replace 5653 with the field IDs that are inside the Repeater.

Create a View from a Repeater Field

If you would like to learn how to create a View directly from your Repeater field, click here.

Change delete confirmation message

When deleting a repeater row, a confirmation message is displayed to avoid cases where form data is accidentally deleted. To change the message, go to Formidable → Global Settings → Message Defaults and look for the Repeater row delete confirmation field.
Repeater Delete Row Confirmation Message

Limitation

Repeaters are not intended to contain a page break, section field, or another repeater. They can also not be placed inside section fields.

Learn where to put the code when adding a custom PHP function to your site.

Review before submit

Note: Custom code is no longer needed. Please use a Summary field to review before submit.

Other field types are much simpler to display in an HTML field on the last page of your form. But repeater fields need a bit of extra code. Use [frm-repeat-post section_id=25 field_ids='26,27'] in the HTML field at the end of your form. Replace 25 with the ID of your repeater field, and 26,27 with the fields inside of it.

add_shortcode('frm-repeat-post', 'frm_repeat_post');
function frm_repeat_post( $atts ) {
	$content = '';
	$field_ids = explode( ',', $atts['field_ids'] );
	if ( ! isset( $_POST['item_meta'][ $atts['section_id'] ] ) ) {
		return $content;
	}

	foreach ( (array) $_POST['item_meta'][ $atts['section_id'] ] as $row ) {
		if ( $key === 'form' || $key === 'row_ids' ) {
			continue;
		}
		foreach ( (array) $field_ids as $field_id ) {
			if ( is_array( $row[ $field_id ] ) ) {
				$content .= ' ' . sanitize_text_field( implode( ', ', $row[ $field_id ] ) ) . '
';
			} else {
				$content .= $row[ $field_id ];
			}
		}
		$content .= '<br/>';
	}
	return $content;
}

Copy a calculated value from a repeater

If you need to copy a calculated value from one repeater to another repeater, you can start with this Javascript example.

Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright ยฉ 2025 Strategy11, LLC. Formidable Formsยฎ is a registered trademark Strategy11, LLC.

    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms