[[REPEAT]] repeats a block once for each value in a list. Use it for schedules, line items, shareholders and anything else with a variable number of rows.
[[REPEAT]]
<p>{{#}}. {{shareholder_name}} holds {{shares}} shares.</p>
[[ENDREPEAT]]
If shareholder_name holds three values, the block appears three times:
1. Ann Jones holds 500 shares. 2. Ben Price holds 300 shares. 3. Cat Wu holds 200 shares.
[[REPEAT=count:5]] ... [[ENDREPEAT]] [[REPEAT=static:true]] ... [[ENDREPEAT]]
| Option | Effect |
|---|---|
| count:{number} | Always shows this many rows. |
| static:true | Stops recipients adding or removing rows. |
If the fields inside the block have ---collect_data:true, recipients can add and remove rows as they fill in the form.
A list can come from a multi-select field, from a workflow (pass values separated by [|]) or from a data source (see Pulling data into documents).
[[LOOP]] and [[ENDLOOP]] are alternative names for [[REPEAT]] and [[ENDREPEAT]].