Please make sure you are familiar with repeatable sections before continuing.
There are two methods for putting content from repeatable sections into your template. If the repeatable content is to be placed in the document sequentially without any other content in between the repetitions, you can use a Repeating Section Content Control (Method #1). If the repeatable content is not placed in the document sequentially or there is other content between repetitions, you must use normal Rich Text Content Controls (Method #2).
Where it is possible to make use of Method #1, it is highly advised to do so. Method #1 required significantly less building work and is instantly scalable.
Method #1
Method #1 involves building one "generic" version of the content to be repeated. This version is converted into multiple specific versions (as required following named range evaluation) automatically when the document is generated.
A Repeating Section Content Control is a special type of content control that allows for the content within it to be repeated multiple times. The benefit of this is that you only need to build the repeating section of the template once, rather than once for each repetition.
To build content that can repeat, use the question labels and repeatable named ranges exactly as they appear in the form, i.e., keep the {{Repeat}} variable in the merge field comment and content control title.
Note: As shown in orange in the image below, a Repeating Section Content Control is identified in MS Word with two opening and closing tags, with the label in the outer tags.
Importantly, the title of the Repeating Section Content Control must be exactly the same as the associated repeatable named range (including the {{Repeat}} variable).
Merge fields within Repeating Section Content Controls
To merge content into your document within a Repeating Section Content Control, leave the {{Repeat}} variable as is (e.g., "Full legal name #{{Repeat}}") and leave the base reference of tokens as is (e.g., "[@123456798]'s favourite colour:").
Method #2
Method #2 involves building every "specific" version of the content. Each version must be built with its relevant "repetition number" (e.g., 1, 2, 3 etc) in every comment and named range that is associated with the repeatable section.
To name your content controls, replace the {{Repeat}} variable from the named range with the relevant "repetition number" (e.g., the named range "Person#{{Repeat}}" becomes the content controls titled "Person#1", "Person#2", "Person#3" etc).
To merge a field that contains the {{Repeat}} variable, replace "{{Repeat}}" with the numeric value that "{{Repeat}}" will be when the smart online form is answered (e.g. 1, 2, 3...) as shown in the example below.
Where a question label contains a token, you must update the base reference into a composite reference i.e., a field reference that refers to a specific repetition of a field within a repeatable section. To do so, we use a tilde (~) notation (e.g., the question label "[@123456798]'s favourite colour:" become the merge fields commented "[@123456798~1]'s favourite colour:", "[@123456798~2]'s favourite colour:", "[@123456798~3]'s favourite colour:" etc).