Insert a Variable Field in a Text Template

To insert a variable in your template text, you have two options: you can select a portion of the text that will change (such as a name, date, number, and so forth) and replace it with a variable field, or you can insert a variable field without selecting any text at all. If you select text, once HotDocs replaces the text with a HotDocs variable, it searches for other instances of the text and gives you the chance to replace those instances with the same variable. If you choose to simply insert a variable in the template without replacing template text, HotDocs inserts the variable only once.

To replace template text with a variable

  1. Select the text you want to replace and click the Variable Field button. The Variable Field dialog box appears.
  2. Select the type of variable you want to insert. Your options include Text, Date, Number, True/False, Multiple Choice, Computation, and Personal Information.
  3. Type a variable name in the Variable field. (If the variable already exists, select it from the drop-down list.) (See Tips on Naming Your Variables.)
  4. Optionally, clear Use defaults and select an example format from the Format drop-down list. This format will determine how the answer appears in the assembled document. It is applied to this instance of the variable only. (See Format the Variable.)
  5. Click the Edit Component button to modify the variable's component properties. (Click any of the following links for information on customizing a specific variable type: Text, Date, Number, True/False, Multiple Choice, and Computation.) When finished making changes, click OK. The Variable Field dialog box appears again.
  6. Click either Replace Once (replaces this instance of the variable only), or Replace Multiple (displays the Find and Replace dialog box where you can choose which instances you want to replace).
  7. If you selected Replace Multiple, the Find and Replace dialog box appears.
  8. Click the appropriate replacement option: Replace, Replace All, or Find Next. HotDocs replaces the text. (See Replace Other Instances of Selected Text with a Variable.)

WordPerfect users: When replacing multiple instances of text in a template, HotDocs will not replace those instances found in headers, footers, footnotes, and text boxes. You must manually replace those.

To insert a variable without replacing any text

  1. At the HotDocs template, insert the cursor where you want the variable to be.
  2. Click the Variable Field button. The Variable Field dialog box appears.
  3. Select the type of variable you want to insert. Your options include Text, Date, Number, True/False, Multiple Choice, Computation, and Personal Information.
  4. Type a name in the Variable field. (If the variable already exists, select it from the drop-down list.) (See Tips on Naming Your Variables.)
  5. Optionally, clear Use default and select an example format from the Format drop-down list. This format will determine how the answer appears in the assembled document. It is applied to this instance of the variable only. (See Format the Variable.)
  6. Click the Edit Component button to modify the variable's component properties. (Click any of the following links for information on customizing a specific variable type: Text, Date, Number, True/False, Multiple Choice, and Computation.)
  7. When finished making changes, click OK at both the Variable Editor and Variable Field dialog boxes. HotDocs inserts the variable.

You can assign text formatting—such as font, style, and size—to a specific occurrence of a variable. To do this, select the variable reference (including the chevrons) and use your word processor commands to assign the format. When the document is assembled, the text will be formatted the way you specify. If you must use a symbolic font, assign the font properties at the Variable Field dialog box. See Control How Answers Appear in the Assembled Document.

In Microsoft Word, you can also insert variables either by clicking on the HotDocs drop-down menu in the HotDocs toolbar and choosing Variable Field, or by right-clicking in the template and choosing Variable Field from the shortcut menu.

Be sure to use the relevant HotDocs field dialog (Variable Field, IF Field, etc.) when creating or editing fields in word processor templates. Editing field contents directly in Word must be done with care, since features like AutoFormat can substitute characters without your knowledge- for example replacing straight quotes with curly quotes, or hyphens with en-dashes. While HotDocs tolerates some of these AutoFormat substitutions in RFT templates, it does not in DOCX templates. If you must edit the content of a HotDocs field directly, you should either turn off Word's AutoFormat feature or undo (using Ctrl+Z) the unwanted character substitutions it makes.