Skip to main content
Version: 1.28 (Current)

Forms 2.0 - Repeater

caution

This page is preliminary and subject to change as Forms 2.0 continues to be developed.

A container that holds other fields and repeats them for multiple items - for example, letting a user enter several addresses, or several line items, within a single form.

forms-2-0-form-builder-build-repeater-render.png

Adding a Repeater

Drag the Repeater tile from the field palette onto the Canvas - see Build for more on adding and arranging fields in general. Once it's on the Canvas, drag other fields into it - these fields make up the template repeated for each entry.

How repeating works

At runtime, the person filling out the form sees one set of the contained fields per entry, under a collapsible header labeled with that entry's Entry Name or Entry Title, plus an Add button (labeled by Add Button Title) to add another entry. Each entry can be removed individually, subject to Minimum Entries. Entries can also be preloaded from an existing list of records using Initial Entries and Initial Entry ID Key - useful for letting a user edit a set of existing records rather than starting from scratch.

Parameters

Only Repeater-specific parameters are listed below. See Common Field Settings for the settings shared with other field types.

FieldDescription
Initial EntriesThe name of the entity list used to populate the Repeater's initial entries.
Initial Entry ID KeyThe name of the property that contains each entry's ID, available at submit time to update existing records. Entries without an ID are treated as new.
Layout ModeVertical and Horizontal arrange each entry's fields automatically. Manual allows free placement and resizing in a mosaic layout.
ColumnsOnly shown in Manual mode. The number of columns in the mosaic layout.
AlignmentOnly shown in Horizontal mode (Top/Middle/Bottom) or Vertical mode (Left/Center/Right). The alignment of the fields within each entry.
GapSpacing between fields within each entry - Inherit, Compact, Normal, or Loose.
PaddingThe padding for the container, in CSS units (for example 8px 0px).
Minimum EntriesThe fewest entries the user must provide (maximum 100). Leave empty or set to 0 for no minimum. Supports Tokens.
Maximum EntriesThe most entries the user can add. Defaults to 100. Supports Tokens.
Entry NameThe default label for each entry. Supports Tokens.
Entry TitleTokens of fields contained in the entry, used to dynamically update the entry's title as the user fills it in - replacing Entry Name once those fields have data.
Add Button TitleThe text shown on the button end users click to add another entry. Defaults to Add. Supports Tokens.
Root CSS ClassesOne or more CSS class names, separated by spaces, applied to the field's root element only. Supports Tokens.

Common settings that apply to Repeater

A Repeater supports these Common Field Settings:

  • General (Label, Name, and Hint)
  • Active
  • Visibility settings
  • Enabled settings

Repeater does not support Field Automations or Field Validators - use Minimum Entries and Maximum Entries above to constrain how many entries are required or allowed.

Tokens

A Repeater returns its entries as tokens and lists, referenced using the field's Name - for example, if the field's Name is Addresses:

TokenDescription
[Addresses]A JSON array of all current entries.
[Addresses:Count]The number of entries.
[Addresses:UpdatedEntries:Count]The number of updated entries.
[Addresses:DeletedEntries:Count]The number of deleted entries.
[Addresses:UpdatedEntries:<EntryID>]An updated entry's ID, from Initial Entry ID Key (only available when Initial Entries is set).
[Addresses:DeletedEntries:<EntryID>]A deleted entry's ID, from Initial Entry ID Key (only available when Initial Entries is set).

It also exposes these as Lists (for iterating in actions): the entries themselves, :InsertedEntries, :UpdatedEntries, and :DeletedEntries.