A HotDocs template is a document-based HotDocs application you build in HotDocs Author to gather answer data from users and produce customized documents specific to each user. For example, you can create a HotDocs template from an existing Word document (by replacing all the changeable text – e.g., names, addresses, phone numbers, etc. – with placeholders), then generate an interview that turns those placeholders into questions, then lastly, assemble a customized document specific to each user who fills out the interview.
In this topic ShowHide
A HotDocs template is based on a document whose main content you want to use over and over for different users. The main text of such a document does not change, while the details that make it specific to a given user need to change to make the document work for more than one user. HotDocs enables you to convert a standard Word document into a HotDocs template where you replace the changeable text with HotDocs fields called placeholder fields that you can use to reference template building blocks called components. The main component types you use in your templates include:
Once you build your template using the elements above, you instruct HotDocs to generate an interview. An interview is the mechanism HotDocs provides to gather data from your template users. With the data you gather in an interview, HotDocs assembles a customized document.
There are three types or categories of HotDocs templates:
You create a DOCX template in Microsoft Word. You usually modify an existing document adding variables and HotDocs logic to create a DOCX template, although you can also start with a blank document. The final document HotDocs assembles from the template is also fully editable in your word processor. Templates you create in Word have a .DOCX file name extension.
|Plain text template||
When you want your template to produce a plain text document without formatting (for example, a .TXT or .XML file), you use HotDocs Composer (a part of HotDocs Author) to create a plain text template.
Answer Intakes differ from DOCX and Plain text templates in one main respect: are not document-based; rather they consist of an interview computation where you call the components or files you want to appear in an interview. You most often use Answer Intakes to gather answers you intend to use to pre-populate other interviews, or to act as a master interview for large document sets.
Among others, the a HotDocs template enables you to perform the following common tasks:
Before you create a template, if you have a complicated set of documents you want to turn into templates, you should plan your template authoring project before you begin creating any templates. In addition, before you can create a HotDocs template, you must first create a workspace where you can store your template. Once you actually create your template, you build out your template functionality by following the workflow in the diagram:
There are two files HotDocs uses to assemble a customized document from your HotDocs template:
When you test your template locally, HotDocs also generates another file to deal with the answers you add during the interview:
There are two additional files HotDocs creates in the background when you create a template file. These files support the template at various stages in its life cycle. HotDocs stores these files on disk inside the workspace folder with the template.
HotDocs only displays the actual templates in the template list that appears in the Workspace Explorer.
The component file contains all of the components you create to enable HotDocs to gather and format the information you need to fill in the placeholders in the template file. The name of the component file associated with your template appears in the template details pane of Workspace Explorer as a clickable link that opens the workspace in Windows File Explorer. The default name for the component file HotDocs creates for a given template is the template filename and extension, followed by the .cmp extension. For example, a DOCX template's component file name format is: TemplateFileName.cmp.
The template configuration file for your template "points to" or declares the association between every template and its component file. The configuration file also stores the values of the template properties you set in the Template Properties dialog. Conceptually, the configuration file is "part of" the template, and whenever you update your template properties using the Template Properties dialog, the values in the template configuration file update.
The default name for the configuration file HotDocs creates for a given template is the template filename and extension, followed by the .config extension. For example, a DOCX template's configuration file name format is: TemplateFileName.docx.config.
When you create a new template from within an existing template, HotDocs creates the new template and its configuration file and points the new configuration file to the same component file as the parent template.
The template configuration file also contains a template identifier number that helps HotDocs to update the template properly. This identifier also helps HotDocs keep things in sync with the other half of HotDocs Advance (HotDocs Hub), so that Hub can recognise the template when you upload your template. If you need to upload the same template twice, you can generate a new template identifier.
You can edit a Template Identifier manually if you need to. Template Identifiers must use hexadecimal format (0-9 and A-F).
From any HotDocs template you can create a reference to, and thus, use, another template as an "auxiliary" template to augment the contents and functionality of your current, or "parent" template.
There are two ways to reference an auxiliary template from a parent template:
By default, the Workspace Explorer does not show auxiliary templates in the list it displays of the templates in your workspace (you can change this setting using filters). On the other hand, when you select any template, if it references any other template, an expandable panel appears in the right pane labeled Auxiliary Templates. It also displays the number of auxiliary templates you reference from the current template. You can expand the list to review the names. Clicking the name of an auxiliary template opens it for editing.
If the template you select in the left pane acts as an auxiliary to another template, another expandable panel appears to the right labeled Used In. This also indicates the number of templates that reference your current template. You can expand the list to review the names. Clicking the name of a template opens it for editing.
While any template you reference from a parent template acts as an auxiliary to the parent, you may also make these templates available to your template users on their own. You may, however, find it useful to restrict certain templates to act only as auxiliary templates. If you want to ensure that you never upload such templates to HotDocs Hub, you can set the Auxiliary Template Only property in the Template Properties Dialog Box.
If you create a template by selecting content within a parent template, then, in the HotDocs Field Editor, choose to make that content into an auxiliary template, by HotDocs sets this property on the new template you create. You can change this property setting at any time.
Among others, the following reference topics relate to this conceptual area: