Add a Comment to a Variable or Instruction Field

When you insert a variable or instruction in a template, you can add a comment to the insertion field. Comments are useful when you want to document information about the variable or instruction you are inserting and you want those comments to be viewable by anyone editing the text of the template.

Comments can also be useful when viewing a markup view of the template—the comment can describe (in easy-to-understand terms) the purpose of the field or provide a more reader-friendly name for the field.

If you want to add comments to a specific component, enter it at the Notes tab of the component editor. See Add Notes to Components for details.

To add a comment to a variable or instruction field

  1. Insert a new variable or edit an existing variable. (See Insert a Variable Field in a Text Template or Edit a Variable.) The Variable Field dialog box appears. Or, insert a new instruction or edit an existing instruction. The instruction field dialog box appears.
  2. Click Show Advanced. The view expands to show advanced options.
  3. Enter your comments in the Comment field.

When you click OK, HotDocs merges the field, with the comments merged after the variable name, like this: «Employee Salary //Calculates biweekly salary based on hourly rate».

To merge a comment in an END instruction (such as END IF, END REPEAT, OR END SPAN), place your cursor before the closing chevron, enter two forward slashes (//), and type your comment, like this: «END IF //Closing». If the END instruction contains a Keep Return code ( | ), enter the comment before the return code, like this: «END IF //Closing |».