Getting the Most out of HotDocs: Number 3
The next in our blog series of hints and tips for HotDocs use describes how dynamic questions created by template authors can enhance end user experience and increase document production speed.
The Right Question
Document automation offers the ability to provide dynamic documentation that adjusts itself to specific circumstances, and constructs a document that has just the right text and clauses in just the right places. It does this by presenting the user with a set of intuitive questions that gather answers, which are used to direct the construction of the document. It can even use those answers to ask different questions, providing the user with a meaningful interview at every step. What not all template developers know is that we can also make the questions themselves appear differently based on those answers. We do this by setting up dynamic prompts.
A prompt is the text assigned to a variable that appears as the question text in the interview. So a variable named ‘EmployeeName-txt’ can display a prompt to the user that reads ‘Please enter the full name of the employee here.’ Most variables will have flat text as the prompt, but all prompts (and indeed all text fields destined for display in the interview, including resource text and dialog titles) can also contain HotDocs variable fields. This provides us with a powerful tool to craft the interview experience for a user (without too much hard work).
Consider the following example: I need to enter the amount of an additional maintenance fee. That may be paid monthly, quarterly or annually. The template contains the number variable MaintenanceCost and the multiple choice variable MaintenancePaymentFreq with options for month, quarter and year. Once the user selects the maintenance payment frequency, I would like to indicate that frequency in the prompt for the maintenance cost.
To do this, I need to edit the MaintenanceCost component and right-click in the prompt field. In the menu that drops down, I select ‘Variable Field.’ This opens the same variable field dialog that is displayed in the main document when clicking the Variable Field button in the HotDocs ribbon. I would select Multiple Choice as the type, and choose MaintenancePaymentFreq. When I click on OK, a HotDocs field – complete with chevrons – appears in the prompt. I can then add text around that field, and get something like this:
Please enter the «MaintenancePaymentFreq» maintenance payment
Since my options are not grammatically correct in this instance, I can alter the merge text for this field by double-clicking inside the chevrons, just like in a Word document. I end up with something like this:
Please enter the «MaintenancePaymentFreq:monthly/quarterly/annual» maintenance payment
When MaintenenceCost is asked, that variable field is resolved by HotDocs, displaying the selected text in the prompt.
This technique can be used to generate any dynamic prompts you might need. You can use this to create mirrored wills, multi-lingual interviews – the uses are almost infinite. Using dynamic prompts can offer your users an enhanced, superior experience and assist them in producing documents more quickly and more accurately. Nothing drives someone to the right answer like asking the right question.