Use Scripts to Add Power to Your Dialogs

You can create scripts for your dialogs that allow you to hide or dim variable questions, require certain questions be answered before the user can proceed 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.

Before creating a dialog script, see Special Instructions for Dialog Scripts as well as Understand the HotDocs Scripting Language. Dialog scripts should only change the appearance of variables in a dialog—they should not be used to compute answers.

To create a script for a dialog

  1. Open a dialog for editing. (See Edit a Custom Dialog.) HotDocs displays the Dialog Editor.
  2. Click the Script tab. The window changes to show scripting options.
  3. Enter your dialog script. (See Use the Script Editor and Special Instructions for Dialog Scripts.)

Once you have written your script, you can make sure it works correctly by testing the dialog. The dialog appears just as it will during regular assembly. (See Test a Custom Dialog.)

At the Script tab, the Components list shows the components (including dialog element components) in the order they are used in the dialog. This makes it easier to see exactly which components you can use in the script.