Repeater Control
Repeatable field groups for complex data structures. Pro feature.
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
label | string | - | Field label |
control | string | repeater | Control type |
attributes | object | - | Nested attributes for each row |
default | array | [] | Default values |
Example
Section titled “Example”{ "attributes": { "teamMembers": { "type": "array", "default": [], "wbs": { "label": "Team Members", "control": "repeater", "attributes": { "name": { "type": "string", "default": "", "wbs": { "label": "Name", "control": "text" } }, "role": { "type": "string", "default": "", "wbs": { "label": "Role", "control": "text" } }, "photo": { "type": "string", "default": "", "wbs": { "label": "Photo", "control": "image" } } } } } }}Template Usage
Section titled “Template Usage”<div class="team-grid"> {% for member in attributes.teamMembers %} <div class="team-member"> {% if member.photo %} <img src="{{ member.photo }}" alt="{{ member.name }}" /> {% endif %} <h3>{{ member.name }}</h3> <p>{{ member.role }}</p> </div> {% endfor %}</div>Use Case
Section titled “Use Case”Use Repeater for lists of items with multiple fields: team members, feature lists, pricing tables, testimonials, etc.
Pro Feature
Section titled “Pro Feature”The Repeater control is only available in WPBits Block Studio Pro. See Pro Features for more information.