Introduction: Template and Component Files

The Template File

The first step in automating a new HotDocs template is to create a template file. You can create three types of template files: text templates, form templates, and interview templates.

  • You create a text template in Microsoft Word or WordPerfect. You can modify the underlying text of a text template both as you automate the template and as you view the assembled document in the word processor.

    HotDocs assembles all Word templates using a DOCX-based assembly process. This means that if your template is in DOT or RTF format, HotDocs must assemble it and then convert it back into Word's native format. By developing the templates in DOCX, you can reduce the number of steps in this process, thus decreasing the amount of time it takes to assemble a document. In larger, more complex templates, this difference in speed will be quite noticeable.

  • You create a form template using a Windows program (such as a draw program) to create a static form, or one in which the user will not be able to change or modify the underlying text. Once designed, you then use HotDocs to create a PDF version of the form. Finally, you use HotDocs Automator to place fill-in fields on the form where users' answers will be inserted.

  • You create an interview template to gather common information (such as court, attorney, or client information) and save the answers for use in assembling other documents. Unlike text and form templates, users cannot generate documents from an assembled interview template—they can only generate an answer file. (The interview template is really a component file that contains ASK instructions. See Create an Interview Template.)

It is recommended that template names are kept to less than 52 characters and don't use non-ASCII characters. This will reduce the possibility of the template name causing errors if it is enabled for use with HotDocs Server.

The Component File

When you create a new template file, HotDocs automatically creates a companion file called the component file. The component file contains information about variables and other components used in the template. Both the template file and the component file are necessary for a template to work. Whenever you copy a HotDocs template—for example, to share a template with another user—you must be sure to copy both the template file and the component file.

HotDocs gives the component file the same name as the template file, except that the file name extension for the component file is .CMP. For example, if the template file name is Insure.rtf (for a Word template), the component file name will be Insure.cmp.

The following image shows a fully automated text template with its component file superimposed and overlapping the template:

The component file works automatically in the background—as you create various components in the template, they are automatically stored in the component file. Normally each template uses its own component file, but you can make two or more templates share one component file.

You work with components in the component file using Component Manager. For example, you can copy variables or other components from one component file to another, create variables, and drag variables from Component Manager directly into the template. You can also edit, print, search, and spell check components within your component file. Finally, if you need to edit components in several component files at once, you can use Template Manager.

HotDocs does not support templates with embedded mail merge data. You need to remove this data before assembling the template.