<Repeater>

Start of documentation content

The <Repeater> can handle repeating parts of forms, such as 'add another email address'.

The repeater will repeat all components below itself e.g. if you want a form field with multiple phone numbers, then you could use a <Repeater> wrapped around a <Text>.

<Repeater> can be nested e.g. a form with multiple 'people', each with multiple phone numbers.

Use of <Repeater>

Formally: Loading form, please wait...

<Repeater>'s props

PropAboutType
addButtonHtml

Localisable HTML: add repeatable button content.

E.g.

{
  en: 'Add new contact',
}
LocalisedHtml
maxRepeats

The maximum number of repeatable items.

This value is optional.

number
minRepeats

The minimum number of repeatable items.

You probably want to set this to 1.

This value is optional.

number
removeButtonHtml

Localisable HTML: remove repeatable button content.

E.g.

{
  en: 'Remove contact',
}
LocalisedHtml
id

Component Id.

Must be unique within the form.

string
meta

Arbitrary metadata on this node.

This is useful when developing custom controls as it allows you to pass down metadata/extensions.

MetaData
childrenById

Used to indicate children ids of this component.

If used in React this is non-editable.

string[]
hasChildrenById

Non-editable.

Used to indicate that this component can have children.

true
hasTagsById

Non-editable.

Used to indicate that this component isn't a form field with tags by id.

false
isFormField

Non-editable.

Used to indicate that this component isn't a form field.

false
isMultichoice

Non-editable.

Used to indicate that this component isn't a multichoice form field like <Select>, <Radios> or <Checkboxes>.

false
type

Non-editable.

Type of component of "Repeater".

"Repeater"