REQUIRE ALL Instruction
The REQUIRE ALL instruction forces the template user to answer all variables in the dialog before they can move to the next dialog, or finish the interview, that is, unless you select Enable Navigation Past Required Variables in the Template Properties dialog box. If you do select that property, your template user must still answer the required questions before completing the interview.
The REQUIRE ALL instruction is only available when you are creating a dialog script in the Script tab of the dialog editor.
You may find you need the template user to answer all of the variables on a dialog before they move on to the next part of the interview. For example, HotDocs might use the answers the template user provides on one dialog to determine which variables it shows in the rest of the interview.
If you make all the variables on a dialog "required", in the interview outline the template user can see a red asterisk (*) on that dialog icon indicating that there are required variables that they must answer before moving on in the interview. On the dialog itself, all of the variables prompts (or names, if you don't provide a prompt) display red to indicate they are all required. Once a template user answers the required variable, the prompt reverts to black. Once they answer all required variables on a dialog, the red asterisk on the interview outline disappears.
You can enable a template user to navigate past a required question (but still require the question to be answered before completing the interview) using the Enable navigation past required variables option in the Template Properties Dialog Box's Interview Behavior tab .
To make sure your template users know a variable is required, you can add a text dialog element to the dialog to explain.
Instruction name | Model | After you drag and drop the model into the script tab: |
REQUIRE ALL | REQUIRE ALL | You don't need to do anything further with this model. |
Example
A template author is creating a new template for a medical insurance claim document. Before HotDocs can display the full interview, it needs to know what level of coverage the customer has and whether the template user is the injured party or someone else filling in the interview on behalf of the injured party. These conditions change which variables HotDocs needs to display in the following dialogs. In the first dialog, the template author needs to make sure that the template user selects what level of coverage they have with the company and whether they are the injured party or not.
In the first dialog, the template author creates two new variables to gather that information: a Single Select variable to select their coverage level and a True/False variable to ask if they are the injured party.
The template author adds the following script to the script tab of the dialog editor:
REQUIRE ALL
Now when a template user opens the interview, they see the two variable on the first dialog are required. The template user cannot continue with the interview until they answer those two questions (unless you enable a template user to navigate past required question as mentioned above).