GRAY Instruction

The GRAY instruction stops the template user from interacting with the component you specify, but keeps it visible on the dialog.

The GRAY instruction is only available when you are creating a dialog script in the Script tab of the dialog editor.

In a dialog, you may have variables that are only applicable when the template user provides a certain answer to a preceding variable. For example, the first variable in a dialog might ask if the template user has children. If they answer yes, then variables asking the children's names and ages are applicable, but if they answer no, those variables aren't applicable, and the template author can use the GRAY instruction to disable these variables.

Instruction name Model After you drag and drop the model into the script tab:
GRAY GRAY ⟦VAR⟧ Replace ⟦VAR⟧ with the variable that you want HotDocs to gray-out and make unanswerable on the dialog where you add this instruction.

Example

In an interview for a medical insurance template, a dialog needs the answers to the following variables:

The template author creates two variables to gather those answers:

The template author wants to make it clear that the template user doesn't have to answer SpouseName if they answered No for the variable CurrentlyMarried, so the template author adds the following script to the script tab of the dialog editor:

IF NOT CurrentlyMarried

GRAY SpouseName

END IF

In the above script, the template author uses an IF instruction followed by a NOT TRUE_FALSE expression to make the IF instruction conditional on the template user answering No to CurrentlyMarried. If the template user answers No, the condition is met and SpouseName is grayed out. They then use the END IF instruction to close the conditional region of the script.

Download

After you download the example template, you can import the template to any workspace to see this example code in action.