Cocoon Forms: repeater widget (2.1 legacy document)
Concept
An fd:repeater widget is a widget that repeats a number of other widgets. It can be used to create e.g. tables, repeating subforms, etc.
Configuration
<fd:repeater id="..." initial-size="..."> <fd:label>...</fd:label> <fd:hint>...</fd:hint> <fd:help>...</fd:help> <fd:widgets> [...] </fd:widgets> <fd:validation> [...] </fd:validation> </fd:repeater>
The fd:widgets element should contain a number of other widgets to repeat. This can be any of type of widget: field, multivaluefied, booleanfield, or even repeater itself.
The optional initial-size attribute allows to specify how much rows should be initially present on the repeater. It mostly avoids to display a table with only table headers. Default value is zero.
For a description of the other elements, see the field widget.
Note: The Forms Template Transformer has specific support for specifying a template to use to render each of the rows of a repeater widget. See the CForms samples for an example on how to use this.