Dialog Scripts Overview
A dialog script is a set of dialog-oriented instructions in the HotDocs scripting language that you add to the Script tab of your dialog to change the appearance and behavior of the dialog's variables in the interview. For example, you may want to limit the number of answers a user can add to a list; in this case, you would use the LIMIT instruction to limit the number of times HotDocs displays the repeated dialog.
Overview
You can create scripts for your dialogs that enable you to hide or gray variable questions, require your template user to answer certain questions before proceeding to the next dialog, and assign predetermined values to variables. You can also use scripts to make variables within a dialog conditional, just as they are in the underlying template text.
Common Tasks
Among others, dialog scripts enable you to perform the following common tasks:
- Add a script to a dialog
- Limit the number of answers allowed for a repeated dialog
- Hide or gray variable questions
- Require certain questions be answered before the user can proceed to the next dialog
- Assign predetermined values to variables
- Make variables within a dialog conditional, just as they are in the underlying template text
Workflow
Review the list of available dialog script instructions to see what these instructions enable you to accomplish. You use the Dialog Editor's script tab to create a script. You first open your dialog for editing, then drag and drop the appropriate instruction from the Models tab to the right on the Script tab; then replace the placeholders by dragging and dropping components from the Components tab, or typing directly on the Script tab.
The Components tab shows the components (including dialog element components) that are available for you to use. Click the Contents tab to see rearrange the order in which they appear in the interview.
Once you finish your script, test the dialog to make sure it works correctly. The test version of your dialog appears and works just as it does when you deploy your template to HotDocs Advance.
Common Reference Topics
Among others, the following reference topics relate to this conceptual area: