GRAY ALL Instruction
The GRAY ALL instruction stops the template user from interacting with any components on the dialog, but keeps them visible.
The GRAY ALL 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 ALL | GRAY ALL | You don't need to do anything further with this model. |
Example
In an interview for a mortgage application, the template author wants to create a dialog which first asks the template user's family status (married or single, children or no children) and then disables certain variables depending on the family status they chose.
In the dialog, they have the following variables:
- FamilyStatus – A Multiple Choice variable with the following options:
- Single, no children
- Single, with children
- Married, no children
- Married, with children
- SpouseName – A Text variable to add the template user's spouse's name
- NumberChildren – A Number variable to add the number of children the template user has
In the script tab of the dialog editor, the template author adds the following script:
GRAY ALL
UNGRAY FamilyStatus
IF FamilyStatus = "Married, with children"
UNGRAY ALL
ELSE IF FamilyStatus = "Married, no children"
UNGRAY SpouseName
ELSE IF FamilyStatus = "Single, with children"
UNGRAY NumberChildren
END IF
The initial GRAY ALL instruction disables all variables in the dialog, making them inactive. The UNGRAY instruction then makes the FamilyStatus Multiple Choice variable visible so the template user can select an option.
The IF instruction tells HotDocs that if the template user selects "Married, with children", itmust enable both SpouseName and NumberChildren. The first ELSE IF instruction tells HotDocs that, if the template user selects "Married, no children", it must enable SpouseName. The second ELSE IF instruction tells HotDocs that, if the tempalte user selects "Single, with children", it must enable NumberChildren. The END IF instruction closes the list of conditional options. There is no need to include a condition for the template user selecting "Single, no children" because both SpouseName and NumberChildren would remain gray.