Features/Components

Component repeater field

A repeater field inside a widget lets each instance hold a list of items, rendered by repeating an element.

The Repeater field type of component variables holds a list of rows. Each row has the sub-fields you define (for example title and icon). An instance fills in as many rows as it needs. Inside the component you set an element's Iterable (Advanced panel) to the repeater, and that element is repeated once per row. This is separate from the CMS Repeater field: the component repeater stores its rows in the instance, not in a collection.

How it works

  • Field type value BLOCKS, shown as 'Repeater: Repeat items multiple times with specific item setting.'
  • Sub-fields: a Name and a Type; nested types BLOCKS, SELECT, OPTIONS, COMPONENT and SOURCE are excluded, so sub-fields can be Input, Textarea, Image, File, Toggle, Date or Color.
  • Default value: a list of rows, editable in the variables form.
  • Rendering: the element's Iterable accepts Repeater, multi Media and multi Relation values; render.repeat repeats the element per row, with a Key option for the row variable.
  • Each row's values are processed with the same dynamic syntax as other variables (mdVars process).

When to use it

  • A feature list widget where each instance has its own number of features
  • A logo strip widget with a list of logos
  • FAQ widget with question/answer rows

Limitations

  • Repeater rows cannot contain another repeater, a select, options, a component or a source field.

Availability

  • Works in Designer.
  • Included in every plan.

How to use it.

  1. Open the component's Variables and add a field of type Repeater.
  2. Add sub-fields (name and type).
  3. Select the element to repeat inside the component and set Advanced > Iterable to the repeater.
  4. On each instance, click Edit content and add rows.

Questions.

Is this the same as the CMS Repeater field?

Related features.

No card needed

Build it today.Pay when it goes live.

Every feature is unmetered while you build. Checkout opens the first time you publish.