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 set the Field Properties.

Common Tasks

Field Type

The Field Type element of the HotDocs Field Editor declares whether the currently selected HotDocs Field is a placeholder field or an instruction field.

Action: Create a Conditional Region

You can base a conditional region on a variable or a computed value.

Condition Type Interface (Variables)

Enables you to select a variable for your conditional region:

Element What it Does
Variables
Field Properties
Rule: Include region when...
The answer for variable:
Enables you to select an existing variable using the drop-down list, or to type the name of an existing or a new variable. Click the edit button to open the pop-up variable editor and access the same component properties you see in Component Studio.
Comparison drop-down Enables you to select how you want HotDocs to compare the variable to the value (for example, variable x is...). The comparison list is different for every variable.
This Value (Does not appear for True/false variables) 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.

Condition Type Interface (Computed Values)

Enables you to select a computed value for your conditional region:

Element What it Does
Computation
Expression
 
Enables you to use the HotDocs scripting language to write a computation or an expression that provides a true or false outcome.
Field Properties
Rule: Include region when...
The answer for variable:
(Computation only) Enables you to select an existing variable using the drop-down list, or to type the name of an existing or a new variable. Click the edit button to open the pop-up variable editor and access the same component properties you see in Component Studio.
Comparison drop-down (Computation only) Enables you to select how you want HotDocs to compare the variable to the value (for example, Variable x is...). The comparison list is different for every variable.

Modify a Conditional Region

You can modify an existing conditional region by:

  1. Placing the cursor inside the conditional region, then in the HotDocs Field Editor, clicking Modify a conditional region
  2. Selecting the END IF field in the template, then in the HotDocs Field Editor, clicking Modify.
Element What it Does
ELSE IF Enables you to create an alterative 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 alterative region of the template that HotDocs adds to the assembled document if none of the prior conditions are met during the interview.

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 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.
Clear Choices button Clears all the settings in the Field Editor for the currently selected placeholder field.
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.