Mark Repeated Text
As you mark up a document, you may need to identify sections of the document that you need to repeat. For example, if you’re inserting a list of children, you can cause any variable field (for example, [ChildName;te]) to repeat.
To do this, you surround the text in the document you want to repeat (including variable fields) with repeat field markers. A repeat field consists of an opening bracket, the repeat instruction (including the name of the dialog you want to repeat) and the text you want repeated. You must also include a closing bracket at the end of the repeatable section of text. In the field itself, you must separate the dialog name from its properties using semicolons. After the last defined property, you include a final colon.
For example:
My children are listed as follows: [repeat:Children;format=”a, b, and c”:[ChildName;te]].
Fields between the brackets are added to the repeated dialog. If you want to change the order in which they appear, you can either define the order in the Dialogs table, or you can include a Contents= property directly in the repeat field. Separate the field names using forward slashes, like this: [repeat:BequestList;contents=BeneficiaryName/BequestProperty: I give [BequestProperty;te] to [BeneficiaryName;te]. ...].
When repeating a complete paragraph, it is usually desirable to include the paragraph mark as part of the repeated text. To do this, type the closing bracket after the paragraph mark, such that it appears at the beginning of the following paragraph. For example:
[repeat:SpecificBequestInformation:I give [BequestProperty;te] to [BeneficiaryName;te]. If [BeneficiaryName;te] is not living upon my death, the specific bequest shall lapse and be distributed to my then living children.¶ ]
You can assign the following additional properties to a repeat field:
Many of these properties are described in greater detail here.
Property Name | Description | Value |
name | Shows the name of the dialog you are repeating | A valid dialog name |
contents | Lists the variable fields you want repeated | Variable1/Variable2/Variable3/etc. |
format | Describes how HotDocs formats and punctuates a series of answers in a sentence | ("")
"a, b, and c" "a; b; and c" etc. |
ascend | Sorts the list, based on the specified variable, in alphanumeric (A to Z) order | A variable used in the dialog |
descend | Sorts the list, based on the specified variable, in reverse alphanumeric (Z to A) order | A variable used in the dialog |
filter | Lists a computation variable that limits (or filters) the list of answers you want merged in the final document | A variable used in the dialog |
sortfirst | Sorts the list of items before it applies any filters you've specified | (false)
true |
You can sort answers in your list on two different levels by including two ascend or descend properties in the field. The first ascend/descend property will define the first level of sorting, while the second ascend/descend property defines the second level of sorting. For example, you may want to sort all states in a list in alphabetical order. You can then sort all cities within a state in alphabetical order, too.
HotDocs processes the ascend, descend, and filter properties in the order you provide. For example, if you place the ascend or descend properties before the filter property, HotDocs sorts the list of answers before the it applies the filter.
By default, HotDocs sets a repeated dialog having five or fewer variables to appear in the interview as a spreadsheet dialog with just three rows.
Using a repeat instruction in a table
HotDocs handles repeating the information in one cell of a table just like using a repeat anywhere else in the model. It consists of the repeat instruction, the dialog you want to repeat, and the variable or text you want to repeat, all enclosed in square brackets. For example the following table shows how to repeat the information in one cell of a table:
Child's Name | Child's Birth Date | Items |
[ChildName;te] | [ChildBirthDate;da] | [repeat:Item_List:[Items;te]] |
Repeating Rows in a Table
At times, you need to repeat a row of a table. To do this, you insert an opening field marker before the repeat instruction, but then leave off the closing field marker. This is because the end of the row signifies the end of the repeated field. For example, the following shows how to mark up a repeated table:
Child's Name | Child's Birth Date | Items |
[repeat:Children:[ChildName;te] | [ChildBirthDate;da] | [Items;te] |
Note there is no closing bracket after the Items field. This is because the end of the table row signifies the end of the repeat field.
Nesting Repeated Fields
You can nest repeat fields inside each other. For example, say you need to create a list of children, and then for each child, list the property items each child will inherit.
There are two steps to doing this: 1) nesting the repeat fields in the HotDocs Model, and 2) listing the nested, repeated dialog as a variable of the main dialog in the Dialogs table.
So, for example, in the document, your text would look like this:
[repeat:ChildrenInfo:To [ChildName;te], my child, I give the following items: [repeat:ItemListInfo;format=”a; b; and c”:[Item;te]].
]
The Dialogs table would look like this:
Dialogs
Name | Title | Contents | Resource | Additional |
ChildrenInfo | Children Information | ChildName ItemListInfo | style=repeated; ascend=ChildName | |
ItemListInfo | Item Information | Item | style=ssonparent |
Repeats can not be nested more than four levels deep.
The dialog ItemListInfo appears in the Contents list for ChildrenInfo. Both dialogs include a repeat style.
The property, ssonparent, stands for spreadsheet on parent. It means that HotDocs displays the dialog as a spreadsheet and embeds the spreadsheet directly in its parent dialog.
For examples of how to mark up a HotDocs Model, see Simple Markup Example (Contract), Simple Markup Example (Agreement), and Complex Markup Example with Tables (Last Will and Testament).