TABLE OF CONTENTS
Many templates have a need to present repeating data. Often the precise number of repeated answers will vary from data entry to data entry. You can add repeatable sets of fields to a Form by using a Page Group with the Repeatable property ticked on.
There are two ways to output the answers for these repeatable fields in your template:
These options give you the flexibility to handle repeating data the way you want. For downloadable examples of repeatable data templates, jump to the end of this article.
Please note that placing repeating tables inside repeating pages is not supported on output templates and not recommended within a form design. Please see "Nested Repeats" below.
Often it is useful to place repeating data in a Word table or Excel worksheet. You can create a repeatable listing by adding a special {{!REPEATROW}} placeholder into the very first cell of the row you want to repeat. The system will then repeat the enclosing row and will replace all placeholders found within the relevant data values.
For example, in a Word table:
FIRST NAME | LAST NAME | GENDER |
{{!REPEATROW}}{{firstname}} | {{lastname}} | {{gender}} |
An Excel worksheet may look like:
| LAST NAME | GENDER |
{{!REPEATROW}} | {{lastname}} | {{gender}} |
Remember that you must place the {{!REPEATROW}} placeholder as the very first item in the row!
Repeating rows on an output may end up placed incorrectly. In the below example, the template has the repeating rows on top of the Total row at the bottom (1), though on the output the order is reversed with the repeating rows below the Total line (2). If this should happen, there are two recommended options for getting the rows to display as desired.




At times it may be useful to show repeat values side by side in the same row - for example if you have a gallery or repeating photo capture page, you might want to put the photos side by side in a 2 or 3 column configuration. This is possible by adding some special syntax to the {{!REPEATROW}} placeholder, specifically you must put a pipe character followed by the number of repeats to handle per row. So, for example, if you want to have 3 sets of repeated values side by side, then you would use:
{{!REPEATROW|3}}
Then in the repeated row part of your template, you must specify the desired repeat fields as many times as the number of sets to display. When generated, the answer value from each repeat will be inserted sequentially for each occurrence of the same data name in the row.
For example, in a Word table:
{{!REPEATROW|3}}{{photo}} | {{photo}} | {{photo}} |
An Excel worksheet may look like:
{{!REPEATROW|3}} | {{photo}} | {{photo}} | {{photo}} |
With this option you define the placeholders once for the desired fields in a repeatable page group, and enclose these within special {{!REPEATSTART}} and {{!REPEATEND}} placeholders.
For Excel, the system will repeat all rows found between the START and END placeholders. This tells the system to repeat everything found within the REPEAT placeholders, including formatting, bullet points, table rows, images, static text, etc.
When generating output, the system will make a copy of the area within the REPEATs and will replace all regular data name placeholders found within the area, for each repeat of the answers. For example, imagine we have a Form with a repeatable set of fields for capturing child elements:
You could define a repeatable bullet listing as follows:
{{!REPEATSTART}}
Name: {{lastname}}, {{firstname}}
Gender: {{gender}}
{{!REPEATEND}}
Important Note: Both {{!REPEATSTART}} and {{!REPEATEND}} placeholders must exist on their own rows respectively.
At times it may be useful to show repeat values side by side in the same section - for example, if you have a gallery or repeating photo capture page, you might want to put the photos side by side in a 2 or 3 column configuration, with accompanying captions and other repeated data shown above or underneath each photo. This is possible by adding some special syntax to the {{!REPEATSTART}} placeholder. Specifically, you must put a pipe character followed by the number of repeats to handle per row. So, for example if you want to have 3 sets of repeated values side by side, then you would use:
{{!REPEATSTART|3}}
Then in the repeated section part of your template, you must specify the desired repeat fields as many times as the number of sets to display. When generated, the answer value from each repeat will be inserted sequentially for each occurrence of the same dataname in the section.
For example, in a Word document:
Photos
{{!REPEATSTART|3}}
Photo Name: {{photoName}} |
|
|
{{photo}} | {{photo}} | {{photo}} |
{{photoCaption}} | {{photoCaption}} | {{photoCaption}} |
{{!REPEATEND}}
An Excel worksheet may look like:
|
|
|
Photo Name: {{photoName}} |
|
|
{{photo}} | {{photo}} | {{photo}} |
{{photoCaption}} | {{photoCaption}} | {{photoCaption}} |
|
|
|
Unfortunately, we don't currently support nested repeats within the template engine. When nested repeats are required, the best option would be to collapse the sections to be repeated. As an example, assume you have a list of buildings that contain multiple rooms, and these rooms contain multiple items. You could have a repeating page, or a page within a table where the user can choose a building, then a room, and then an item, from three choice fields in the page. The form could use the PRIOR() formula to set the building and room values dynamically to save a user's time by carrying forward the values from one page to the following page.
To show repeating data within the HTML body of an email connector, simply nest the content to be repeated within the REPEATSTART and REPEATEND placeholders. In the below example, {{textTable1}} and {{testTable2}} are repeating fields within a table:
<table>
{{!REPEATSTART}}
<tr>
<td>{{textTable1}}</td>
<td>{{textTable2}}</td>
</tr>
{{!REPEATEND}}
</table>Attached is a testing form design along with data output templates for Word and Excel that will you help understand how the above functionality works.
See also: