Components Overview
A HotDocs component is a uniquely named building block of a HotDocs template with attributes and rules (properties) that define: its appearance and behavior in an interview, the way it handles answer data, and how HotDocs applies that data when assembling a document. For example, when you create a Text variable (a type of component), you use its properties to give it a name, prompt your template users for the data you want them to supply, determine how many lines of text they can type as their answer, and provide a default format for HotDocs to apply to that answer when assembling a document.
Overview
There are three primary types of components:
- Variable – a type of component you use to query your template user for data of a certain type
- Dialog – a type of component you use to group related components together in an interview
- Computation – a type of component that enables you to calculate values to use in your assembled document
In addition to these main types, there are supplemental components (such as dialog elements) that serve only to modify other components (in this case, dialogs). Similar component types (variables, supplemental components, etc.) are grouped together throughout the Author interface. HotDocs stores all of the components you create (with Component Studio or the HotDocs Field Editor) for use in a given template in a component file. Each component you create contains properties that enable you to perform different tasks in your template. You can review the various types of components and their associated properties below.
Common Tasks
Among others, components enable you to perform the following common tasks:
- Conditionally add a phrase or paragraph into an assembled document based on a yes/no question
- Enable a template user to select an answer from a list of options in an interview
- Calculate values that you can place into assembled documents
- Design the look and feel of an interview
Workflow
Components are at the foundation of HotDocs Author and creating and managing them is an essential part of authoring HotDocs templates. Because you use different components for different purposes, you use components throughout your workflow as you build a template. For example, after you use Author to create a template from an existing document, the next step is to add placeholder fields for text that represents changeable items of data. To enable your template users to provide answer data for such data, create variables (a type of component). You can then group related components into dialogs (also a type of component) to improve the usability and flow of an interview.
You use a similar workflow for creating and managing every component, regardless of its type. For convenience when building templates, Author enables you to work with components from multiple locations in the interface:
Components and the HotDocs Field Editor
In addition to providing the interface where you add placeholder fields to a template, the HotDocs Field Editor also enables you to work with components (though the primary interface for working with components is Component Studio). For example, you can create a component, edit the most common properties for that component, and open a component-specific editor interface all from within the Field Editor itself. Using the HotDocs Field Editor to create and edit components as you add placeholder fields is a convenient and logical way to work with components and is especially recommended for newer HotDocs users.
You can open the HotDocs Field Editor from Workspace Explorer by selecting the template you wish to open, and then clicking the Edit button in the template toolbar.
Components and Component Studio
Component Studio provides you with an interface designed specifically for working with all of the components in your template's component file. Component Studio also provides you a full list of your template's components and enables you to search for, sort, and test your components. Most importantly, Component Studio enables you to edit all of the properties for a component in a component-specific editor. From the component-specific editor, you can explore and edit a component's contents, behavior, notes, references, and write scripts in an organized, tabular interface. Compared to the HotDocs Field Editor (especially for users comfortable with Author's more advanced features) the Component Studio is a more efficient way to create and manage components.
You can open the Component Studio from Workspace Explorer by selecting the template you want to open; then clicking the Components button in the template toolbar.
Component Names
You must give a component a unique name within the template (and in the component file). Components cannot have the same name, even if the components are of different types. This is because HotDocs uses the component name to identify individual components when generating an interview or assembling a document.
Check your component name does not contain invalid characters. The name must start with an alphabetic character but can contain numeric and some special characters. Component names are case sensitive.
Copying Components
When you're creating a new template, you might want to reuse some components you used in other templates. From Component Studio, you can copy components from one component file to another without creating any association between components or the component files. For example, you may be creating multiple templates with very different information but all requiring the same customer details. In this case, you could create components named CustomerName, CustomerAddress, etc. in one template and then copy them into the other template's component file. You could then adjust each version of the component as needed (for example, changing the format style).
When you copy a variable it does NOT copy the dialog that variable links to. If you want to reuse the dialog, you must copy that component as well.
Shared Components
Because all components exist within a component file (and you can share these component files) you can use individual components in more than one template. There are two ways to share a component file:
- Manually
- Automatically
Component Types and their Properties
As mentioned above, each component has several attributes you can set (called properties). Some of these properties (such as Name) apply equally with all other components and some properties only apply to components of the same type. The colored blocks below show the hierarchy and relationships between the various types of components in Author. Each block also displays a list of the properties pertinent to each component type.
Component Identity Property | ||
Name | ||
Display Properties | Behavior Properties | Notes Property |
Prompt | Ask automatically | Note |
Style on regular dialogs (multiple) | Warn when unanswered | |
Width on regular dialogs | Save answer | |
Width on spreadsheet dialogs | If answer is irrelevant | |
Length | Default format | |
Title | Default unanswered text | |
Additional information | Pad answer to fixed number of characters |
Component Identity Property | ||
Name | ||
Display Properties | Behavior Properties | Notes Property |
Prompt | Ask automatically | Note |
Display decimal places | Warn when unanswered | |
Units | Save answer | |
Minimum | If answer is irrelevant | |
Maximum | Default format | |
Width on regular dialogs | Default unanswered text | |
Width on spreadsheet dialogs | Pad answer | |
Title | ||
Additional information |
Component Identity Property | ||
Name | ||
Display Properties | Behavior Properties | Notes Property |
Prompt | Ask automatically | Note |
Width | Warn when unanswered | |
Title | Save answer | |
Additional information | If answer is irrelevant | |
Default format | ||
Default unanswered text | ||
Pad answer |
Component Identity Property | ||
Name | ||
Display Properties | Behavior Properties | Notes Property |
Prompt | Ask automatically | Note |
Yes/No on same line | Warn when unanswered | |
Title | Save answer | |
Additional information | If answer is irrelevant | |
Default format | ||
Default unanswered text | ||
Pad answer |
Component Identity Property |
|||
Display Properties |
Behavior Properties |
Notes Property |
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
Component Identity Property |
|||
Display Properties |
Behavior Properties |
Notes Property |
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
Component Identity Properties | |||
Name | |||
Columns Properties | Display Properties | Behavior Properties | Notes Property |
Name | Prompt | Ask automatically | Note |
Type | Width | Save answer | |
Key | Title | Default format | |
Optional |
Component Identity Property | ||
Name | Result type | Parameters |
Script Properties | Behavior Properties* | Notes Property |
Script | Default format | Note |
Local variables | Default unanswered text | |
Pad answer |
Component Identity Property | ||
Name | ||
Data | Columns | Notes Property |
Options | Name | Note |
Type | ||
Key | ||
Optional |
Component Identity Properties | |||||
Name | Repetition | ||||
Contents Properties | Layout Properties | Script Properties | Display Properties | Behavior Properties | Notes Property |
Content list | Layout info | Script | Dialog Title | Selection grouping | Note |
Local variables | Add button text* | Link Contents to this dialog | |||
Series label* | Ask automatically* | ||||
Prompt position | Suppress when irrelevant | ||||
Right-align prompts | Always stop | ||||
Maximum prompt width | |||||
On parent | |||||
Show buttons for child dialogs | |||||
Prompt to use when button | |||||
Rows to display* | |||||
Additional information |
Component Identity Properties | |
Name | |
Display Properties | Notes Property |
Text | Note |
Display text in |
Component Identity Properties | |
Name | |
Display Properties | Notes Property |
Height | Note |
Component Identity Properties | |
Name | |
Display Properties | Notes Property |
Image file name | Note |
Image alignment |
Component Identity Properties | |
Name | |
Display Properties | Notes Property |
Text | Note |
Font size | |
Alignment |
Script Link Dialog Elements are a type of component that adds a link or button to a dialog, that the user can click to invoke a script.
Component Identity Properties | |
Name | Script |
Display Properties | Notes Property |
Type | Note |
Size | |
Text | |
Image |
Component Identity Properties | |
Name | URL |
Display Properties | Window Options Properties |
Type | Width and Height |
Text | Top and Left |
Image | Menu and Toolbar |
Status and Scrollbars | |
List of options | |
Notes Property | |
Note |