Creating and Adding a Conditional Region

A conditional region, which can be made up of IF, ELSE, ELSE IF, and END IF instructions, tells HotDocs to either include or exclude text from a final document, depending on whether the answers a user provides in an interview meet the conditions you establish in the conditional region.

To create a conditional region using a variable or computation

  1. Open or create a template.
  2. Highlight the content you want to make conditional.
  3. In the HotDocs Field Editor, in the Action list, click Create a conditional region.
  4. Under Condition Type, choose a Variable (True/False, Multiple Choice, Number, Date, or Text) or Computed Value (Computation or Expression)
  5. Under Field Properties > Rule: Include region when... (the value of computation/the answer for variable/this expression evaluates to TRUE), either click the drop down arrow in the field to select the variable, computation, or expression you want to base your conditional region on, or type the name of a new variable or computation and click the Edit button to create a new component with that name.

When you choose a computation that includes parameters, the HotDocs Field Editor displays fields for the parameters. Parameters work in the computation to provide an end-result value. This end-result value is then compared to the value you type in the value field (step 8).

  1. Choose a value from the comparison drop-down.

    The comparison you choose tells HotDocs how to compare your text in the value field with the user's answer to determine if the answer meets your condition. For example, suppose you want HotDocs to include a conditional paragraph when the user's answer to the text variable Insurance Text contains the word benefits. You would select Insurance Text in the variable drop-down, then select contains from the comparison drop-down, and, finally, type benefits in the value field.   

  1. Type a value in the value field.

    If you used a multiple-choice variable in step 6, you can click the drop down arrow on the value field to choose a multiple-choice option, or you can manually type your multiple-choice option into the value field.

  2. Click Add Field. HotDocs places an IF/END IF instruction pair around your content.

Now that you have created a conditional region, you can add ELSE, ELSE IF, or more IF instructions to the region to further customize it.

To create a conditional region using an expression

  1. Open or create a template.
  2. Highlight the text you want to make conditional.
  3. In the HotDocs Field Editor, under Action, click Create a conditional region.
  4. Under condition type, under Computed values, click Expression.
  5. In the expression field, type an expression script that describes the condition that must be met before HotDocs can include the content in the final document, or click the ... button to open the expression editor and create the expression there.
  1. Click Add Field. HotDocs places an IF/END IF instruction pair around your content.

Now that you have created a conditional region, you can add ELSE, ELSE IF, or more IF instructions to the region to further customize it.