Creating a Script

When you create a computation, a dialog script, or an answer intake, you use the Script Editor to write a HotDocs script.

To create a script

  1. Carefully review in your mind (and perhaps write down on paper), the actions you want HotDocs to take. (For example, maybe you want HotDocs to HIDE a variable on a dialog until your template user responds to a related variable's prompt – e.g., hide a Child Name variable until the user answers the Number of Children variable.)
  2. Determine the steps required to achieve the action you want HotDocs to perform. For example, Step 1: Place the variable you want to HIDE within an IF condition so that it only appears if a template user's answer to the related variable meets the condition that causes HotDocs to SHOW the first variable – e.g., in the example above, unless the answer to Number of Children is greater than 0, the Child Name prompt remains hidden.
  3. Use the Models and Component tabs of the Script tab to translate those steps into the appropriate instructions, functions and operators of the HotDocs scripting language so HotDocs can accomplish the tasks you want it to.

For an example script you can create, see the Write a Script and Example Dialog Script sections of the HotDocs Scripting Language Overview.