Limiting the Number of Answers Allowed for a Repeated Dialog

At times, you may want to limit the number of answers your template users can add to a list; you do this by using the LIMIT instruction to limit the number of times HotDocs repeats a dialog.

Prerequisites

To limit the number of answers a user can enter in a list

  1. Open a dialog for editing.
  2. If your dialog is not currently set to act as a repeated dialog, from the Repetition drop-down list, select either Series or Spreadsheet.
  3. Click the Script tab.
  4. On the Models tab to the left, click to expand the Dialog Instructions; then drag the LIMIT instruction onto the Script tab.
  5. Select the NUM placeholder (including the brackets); then replace it with the maximum number of answers you want the user to enter.
  6. (Optionally) Let the user change the limit each time HotDocs assembles the document. To do this, replace NUM with a Number variable by dragging it from your Components tab. Make sure the user answers the Number variable before HotDocs processes the REPEAT instruction.

To control the number of viewable rows in a spreadsheet (but still enable users to enter as many answers as they need), near the top middle of the Dialog Editor, in the Repetition drop-down, select Spreadsheet,; then at the bottom of the Display tab, set the Rows to Display to the maximum number you want the user to see.