HotDocs Author WorkflowCreate a template Add placeholders Group variables in dialogs Create regions and rules Customize an interview Upload a template

Field Editor: Conditional Region

From the HotDocs Field Editor, you create a conditional region to add the instruction fields you need to make parts of your template conditional.

To view the options for a conditional region, in the Field Editor, under Action, select Create a Conditional Region, then the Condition Type, then review the Field Properties.

Common Tasks

Action Box

At the top of the Field Editor, to enable you use the Field Editor to create conditional regions, HotDocs presents:

Element What it Does
Action box (Create a conditional region) Appears when you select any part of the template text that is not already a conditional region.

Clicking the Action or Create a conditional region text expands the Action box to display its default view.

Condition Type Box

Element What it Does
Variables Subheader

Enables you to base your conditional region on the variable type you select, and when you make your selection, opens the appropriate Field Properties box:

Computed Values Subheader

Enables you to base your conditional region on the computed value type you select, and when you make your selection, opens the appropriate Field Properties box:

Field Properties Box

When you select Create a Conditional Region and select a condition type (or click on an existing conditional region field in the template) you can set the following field properties:

Element What it Does
Rule: Include region when... Enables you to establish the rules that determine whether or not the region of the template you have selected is included in the assembled document. The rules differ based on the type of component you choose (using the component selector) to base your conditional region on:
  • True/False Variable – Enables you to include the region based on the template users answer to the True/False variable. You use the options available in the comparison selector to specify the rules:
    • is TRUE (includes the region if the answer to the variable is true)
    • is not TRUE (includes the region if the answer is not true)
  • Single Select Variable – Enables you to include the region based on the templates users answer to a Single Select variable. You use the following elements to specify the rules:
    • The selected option for variable and In Column drop downs – Enables you to choose the variable and the column of the option source that contains the options you want to base your conditional region on
    • The comparison drop down – Enables you to choose the comparisons based on the type of column in the In Column drop down (ex. is, is not, starts with, contains, or ends with)
    • This value text box – Enables you to type a value for HotDocs to compare to the data your template user provides in the interview (this enables HotDocs to establish whether the conditional region evaluates to true or false)
  • Multi Select Variable – Enables you to include the region based on the templates users answer to a Multi Select variable. You use the following elements to specify the rules:
    • The comparison drop down – Enables you to choose contains or does not contain
    • This value text box – Enables you to type a value for HotDocs to compare to the data your template user provides in the interview (this enables HotDocs to establish whether the conditional region evaluates to true or false)
  • Number Variable – Enables you to include the region based on the number the template user types when answering a number variable. You use the following elements to specify the rules:
    • The answer for variable: – Enables you to choose the variable that you want HotDocs to base your conditional region on
    • The comparison drop down – Enables you to choose equals, does not equal, is greater than, is greater than or equal to, is less than, is less than or equal to
    • This value text box – Enables you to type a value for HotDocs to compare to the data your template user provides in the interview (this enables HotDocs to establish whether the conditional region evaluates to true or false)
  • Date Variable – Enables you to include the region based on the date the template user selects when answering the date variable. You use the following elements to specify the rules:
    • The answer for variable: – Enables you to choose the variable that you want HotDocs to base your conditional region on
    • The comparison drop down – Enables you to choose is, is not, is after, is on or after, is before, is on or before
    • This value box and date selector – Enables you to type or select a date value for HotDocs to compare to the data your template user provides in the interview (this enables HotDocs to establish whether the conditional region evaluates to true or false)
  • Text Variable – Enables you to include the region based on the templates users answer to a Text variable. You use the following elements to specify the rules:
    • The answer for variable: – Enables you to choose the variable that you want HotDocs to base your conditional region on
    • The comparison drop down – Enables you to choose is, is not, starts with, contains, or ends with
    • This value text box – Enables you to type a value for HotDocs to compare to the data your template user provides in the interview (this enables HotDocs to establish whether the conditional region evaluates to true or false)
  • Computation – Enables you to include the region based on what a computation evaluates to. You use the following elements to specify the rules:
    • The value of computation: – Enables you to choose the computation that you want HotDocs to base your conditional region on
    • The comparison drop down – Enables you to choose is, is not, starts with, contains, or ends with
    • This value text box – Enables you to type a value for HotDocs to compare to the data your template user provides in the interview (this enables HotDocs to establish whether the conditional region evaluates to true or false)
  • Expression – Enables you to include the region based on whether or not the expression you write (using the HotDocs scripting language) in the This expression evaluates to TRUE: box in fact evaluates to TRUE. You can use the ... button to use the Popup Expression Editor to write the expression.

Advanced Properties

Select the Advanced Properties expander to see further properties for the instruction field:

Property What it Does
Preserve empty paragraph Enables you to force HotDocs to keep an empty paragraph left behind when HotDocs removes a HotDocs field when assembling a document
Comment   You can use this to add notes about the field. A field with a comment attached displays a grey C next to the field name on the template.

Field Type Box (Modify a Conditional Region)

At the top of the Field Editor, to enable you use the Field Editor to modify conditional regions, HotDocs presents the following elements when you click different parts of an existing conditional region:

Element What it Does
IF instruction (Appears when you select the IF instruction field for any existing conditional region). Enables you to modify the condition type and rules that control the conditional region.
Modify a conditional region (Appears when you place the cursor inside an existing conditional region). When selected in the Action box under Regions and Rules,  enables you to modify the conditional region using ELSE IF and ELSE instructions.
  • ELSE IF – Enables you to create an alternative region of the template that HotDocs adds to the assembled document if the first condition is not met during the interview but this condition is. You use the same interface as when you created the initial conditional region to create this condition.
  • ELSE Enables you to create an alternative region of the template that HotDocs adds to the assembled document if none of the prior conditions are met during the interview.
END IF instruction (Appears when you select the END IF instruction field for any existing conditional region). Enables you, after clicking the Modify button in the Field Editor, to modify the conditional region using ELSE IF and ELSE instructions (see above).

 

Field Toolbar

At the bottom of the HotDocs Field Editor, you have access to the following actions:

Buttons What it Does
Add Field Adds the placeholder field to the template in the selected location.
Navigation When a placeholder field is selected, navigation buttons show. Use < and > to navigate to the next HotDocs field. When a conditional instruction is selected, such as ELSE IF, navigation buttons help you to match the corresponding instructions, such as END IF.
Delete Field Button [X] Selecting anywhere in a HotDocs field causes the Delete field button to appear. If you select outside a HotDocs field, or include anything besides a single HotDocs field, the button disappears (if it was previously visible), or else does not appear. Clicking the Delete field button removes the selected field completely. Clicking Microsoft Word's Undo button restores the field completely.

The Delete field button exists to solve a particular problem: In Microsoft Word, you can delete a HotDocs field by clicking in the field, then clicking the field's handle, and then pressing the DELETE key on the keyboard. However, if you select the field using only the keyboard, Word does not easily enable you to delete the field. You can do so by deleting all the content of the field and then pressing the DELETE key again, or if your cursor is just to the right of the field, you can press the Backspace button once to select the field's content, a second time to delete the content, then a third time removes the field. HotDocs provides the Delete field button to simplify this process.