Lesson 9: Create Answer-Gathering Dialogs

Overview

In this lesson, you will learn how to group the variables in your template into dialogs. You will also learn how to change variable prompts and add additional explanatory text (dialog elements) to your dialogs.

After creating dialogs, you will then learn how to display those dialogs in answer wizards, which help users enter answers during direct-fill assembly. You will test these answer wizards as you assemble the template using direct-fill at the end of the lesson.

In lesson 10, you will then learn how to add an interview and complete your form template.

Start the Tutorial

If you are continuing immediately from Lesson 8, skip the instructions for opening the template and proceed to “Gather Variables into Dialogs.”

If you closed the template at the end of Lesson 8, complete the following steps.

To open the tutorial template

  1. Open HotDocs Developer (choose Start > Programs > HotDocs 11 > HotDocs Developer). The My Test Templates library appears.

    If the My Test Templates library does not appear, choose Open Library (File menu), select the library in the default Libraries folder (for example, My Test Templates.hdl), and click Open.

  2. Select Life Insurance Application and click edittemplate.jpgEdit. The template appears in HotDocs Automator, ready for you to edit.

Gather Variables into Dialogs

How you divide variables into dialogs depends on the template and your own pref­erences. Generally, you begin with the most basic information, which, in this template, is the employee’s personal information. In templates that contain logical sections, such as the life insurance application you are automating, it also makes sense to group variables as they are grouped on the form itself. In this template, you will create a dialog for each section of the form, beginning with the Employee Infor­mation section.

To create the Employee Information dialog

  1. At the template, click the componentmanager00369.jpgComponent Manager button. The Component Manager window appears.
    inset_300372.png
  2. Click the Components drop-down button and select Dialogs. The list shows the Beneficiary Designation dialog that you already created in the previous lesson.
  3. Click the newcomponent00373.jpgNew Component button. The Dialog Editor appears.
    inset_700376.png

    You can assign a dialog title to a dialog by typing it in the Title box. The title replaces the dialog name when the dialog is pre­sented during the interview.

  4. Type Employee Information in the Dialog name box.
  5. Drag the following variables into the Contents box, in this order:

    Employee First Name

    Employee Middle Initial

    Employee Last Name

    Employee Social Security Number

    Employee Birth Date

    Employee Gender

    Employee Marital Status

    Employee Street Address

    Employee City

    Employee State

    Employee Zip Code

    Employee Primary Telephone Number

    Employee Email Address

  6. Click Test. A test assembly window appears.
    inset_500377.png

    The dialog looks exactly the way it will during the interview. To make it look nicer, you can place up to three variables side by side on each line.

  7. Select Employee Information in the interview outline, and click the edit00378.jpgEdit Component button. The Dialog Editor is brought to the front.
    inset_4200381.png

    Please see Lesson 14: Change the Placement of Variables in the Dialog (page 121) if you need help arranging variables side by side in the dialog.

  8. At the Layout tab, drag and arrange the following groups of variables to appear on the same line:
    • Employee First Name, Employee Middle Initial, Employee Last Name
    • Employee Social Security Number, Employee Birth Date, Employee Gender
    • Employee Marital Status
    • Employee Street Address
    • Employee City, Employee State, Employee Zip Code
    • Employee Personal Telephone Number
    • Employee Email Address
  9. Click OK to close the Dialog Editor. The test assembly window shows the updated dialog layout.
    inset_1900382.png
  10. Choose Close (File menu) to close the assembly window. The Employee Infor­mation dialog is now complete.

On Your Own

The next dialog you will create is for the Coverage Information section. Create a dialog named Coverage Information, which contains the following two variables:

Amount of Coverage

Monthly Contribution to Cash Account

Please refer to the previous section if you need help creating this dialog.

Create the Medical History Dialog

The dialog for the Medical History section will contain five True/False variables, along with five corresponding Text variables to explain any health conditions.

To create the Medical History dialog

  1. In Component Manager, click the newcomponent00383.jpgNew Component button. The Dialog Editor appears.
  2. Enter Medical History in the Dialog name box.
  3. Drag the following variables from the Components list to the Contents list, in this order:

    Smoker

    Explain Smoking

    Heart Trouble

    Explain Heart Trouble

    High Blood Pressure

    Explain High Blood Pressure

    Diabetes

    Explain Diabetes

    Immune Disorder

    Explain Immune Disorder

    If you were to test the dialog at this point, you would see all of your variables in the order in which you added them to the Contents list, and each True/False variable would contain yes/no options. To simplify the dialog, you can change these True/False variables to use check boxes instead. Not only do check boxes make the dialog appear more compact, they also help reduce the number of mouse clicks required to answer the dialog.

  4. Click the Options tab of the Dialog Editor. The window changes to show several custom options.
    inset_400386.png

    The Select All That Apply grouping causes True/False variables in the dialog to appear as check boxes. This is more efficient than showing yes/no options for each question.

  5. Click the Selection grouping drop-down button and choose Select All That Apply.
    inset_1400387.png
  6. Click Test. The test assembly window appears, showing your dialog. A check box appears for each True/False variable, allowing you to check the health con­ditions that apply.
    inset_1500388.png

Create Custom Prompts for Variables

As you can see in the assembly window, the prompt displayed for each variable is the name of the variable by default. Sometimes, you may want the prompt, or question that appears in the interview, to be different than the variable’s name. Other times, you may not want a prompt at all.

In the Medical History dialog, you will change the prompts for the True/False vari­ables to assist the user in answering the questions appropriately.

To change the prompts for the Medical History check boxes

  1. Go back to the Properties tab.
  2. Right-click on the Smoker check box, and select Edit Component from the shortcut menu. The True/False Variable Editor appears.
  3. In the Prompt box, enter the following text:

    I have smoked within the past 12 months.

    inset_9600389.png
  4. Click OK to close the True/False Variable Editor. The dialog is updated to show the new prompt.
  5. Repeat steps 1–3 to create prompts for the remaining True/False variables in the dialog, using the following text:
    • In the past 10 years, I have had or been told that I have chest pains, heart trouble, heart attack, or heart murmur.
    • In the past 10 years, I have had or been told that I have high blood pres­sure, cancer, or tumors.
    • In the past 10 years, I have had or been told that I have diabetes, pneu­monia, or a disorder of the lymph system.
    • In the past 10 years, I have had or been told that I have AIDS, AIDS-related complex, or an immune system disorder.

Just as you can add prompts to variables, you can add text to the dialog to guide users in answering the questions. In this dialog, you will add text to instruct users what to enter in the text boxes.

To add explanatory text to the dialog

  1. At the assembly window, select the Medical History dialog in the interview outline and click the edit00390.jpgEdit Component button. The Dialog Editor is brought to the front.
  2. At the Properties tab, click the dialogelement.jpgCreate New Dialog Element button and drag it to the top of the Contents box, above the Smoker variable.
    inset_9800395.png
  3. Release the mouse button. The Dialog Element Editor appears.
    inset_8500396.png
  4. Enter Medical History Explanation in the Dialog element name box.
    inset_9900397.png
  5. In the Display text box, type the following:

    Check each statement below that applies to you. For each checked statement, explain your answer in the space provided.

  6. Click OK. The dialog element is created and added to the dialog.
    inset_2400398.png
  7. Click Update. The dialog element appears at the top of the dialog, providing the user with information about how to answer the questions.
    inset_10000399.png

The final change you will make to the prompts in this dialog is to hide the prompts for each of the explanation fields. Since the dialog element you added to the top of the dialog already explains how to answer the questions, the default prompts for these text fields are unnecessary.

To hide the prompts for the text fields

  1. Click in the Explain Smoking field, and then click the edit00400.jpgEdit Component button (or press Ctrl+E). The Text Variable Editor appears.
  2. In the Prompt box, type NONE. (This is a special keyword that tells HotDocs not to display a prompt for the variable.)
    inset_2800403.png
  3. Click OK to close the Text Variable Editor. The test assembly window is updated to show the variable without a prompt.
  4. Repeat steps 1–3 to remove the prompts for the remaining explanation fields.

Make Variables in a Dialog Conditional

In Lesson 7, you made the text fields in the Medical History section of the template conditional upon their corresponding yes/no questions—if a user circles yes, he or she can tab to the text field and enter an explanation for the health condition. You can also use conditional logic to make answer fields in a dialog conditional upon other questions being answered.

In this lesson, you will create a dialog script that grays the answer fields for the health explanations if the user doesn’t select the preceding check boxes.

To create a dialog script

  1. At the assembly window, select the Medical History dialog in the interview outline and click the edit00404.jpgEdit Component button. The Dialog Editor is brought to the front.
  2. Click the Script tab. The window changes to show a scripting box.
    inset_600407.png

    Notice that the Components list contains a list of all of the components used in this particular dialog. They are listed in the same order as they were added to the dialog.

    You can quickly access the list of components by pressing the F5 key or Ctrl+Spacebar.

    3. Click in the Script box, and enter the following script:

    GRAY Explain Smoking

    GRAY Explain Heart Trouble

    GRAY Explain High Blood Pressure

    GRAY Explain Diabetes

    GRAY Explain Immune Disorder

    These instructions gray the explanation fields so the user can’t enter any answers.

  3. After the last GRAY instruction, press Enter and enter the following script:

    IF Smoker

    UNGRAY Explain Smoking

    END IF

    This tells HotDocs that if the user selects the Smoker True/False variable, it should ungray the corresponding Text variable so the user can answer it.

On Your Own

Drag the bottom border of the Script box to make the script-writing area bigger. This allows you to see more of your script.

Using the condition for Smoker as an example, ungray the four remaining Text vari­ables (Explain Heart Trouble, Explain High Blood Pressure, Explain Diabetes, and Explain Immune Disorder) based on their corresponding True/False variables being TRUE.

When you are finished, the dialog script should look like this:

inset_2100408.png

To format the script so that any instructions or vari­ables within an IF instruc­tion are indented, click the autoformat.jpgAuto Format button.

You can now test the dialog to see how the script works. Click Update to preview the dialog in the test assembly window. The explanation fields are grayed until you select the corresponding check boxes. When you are finished testing, choose Close (File menu) to close the test assembly window, and then click OK at the Dialog Editor.

Create Default Dialogs

Your component file now contains four dialogs—three dialogs you have created in this lesson and the Beneficiary Designation dialog you created in the previous lesson. Because the last two sections of the form contain only one variable each, you have several options for creating the dialogs:

  • You could create a separate dialog for each section, as you have done previously. Each dialog would contain only one variable.
  • You could create a dialog for both sections combined, and include both vari­ables in the same dialog.
  • You could use default dialogs, where HotDocs displays each variable in the interview individually as if it were a dialog.

For this template, you will use the third option, which saves you the time of creating dialogs that contain only one variable each.

When HotDocs displays a default dialog for a variable, it uses the variable’s prompt as the title in the interview outline. To make the default dialog more consistent with the other dialogs you created, you can specify your own title instead.

To specify a title and prompt for the Other Remarks default dialog

  1. In Component Manager, select All Variables from the Components drop-down list. The list changes to show all variables in the component file.
  2. Double-click the Other Remarks variable. (You may have to scroll through the list to see the variable.) The Text Variable Editor appears.
  3. In the Title box, type Other Remarks.
  4. In the Prompt box, type the following text:

    Please use the space below to provide additional details, explanations, or other information necessary to establish your insurance eligibility claim:

    inset_7000411.png
  5. Click Test. The test assembly window appears, showing the default dialog for your variable.
  6. Choose Close (File menu) to close the test assembly window, and then click OK to close the Text Variable Editor.

On Your Own

The Authorization variable also needs a custom title and prompt for its default dialog. Use Authorization and Signature as its title and the following text as its prompt:

I hereby authorize Hobble Creek Publishing, the employer, to deduct from my wages amounts equal to the contributions required of me for Group Insurance under the policy issued to the employer by Hobble Creek Life Insurance Com­pany.

Please refer to the previous section if you need help setting the title and prompt for this variable. When you are finished, close Component Manager.

Attach an Answer Wizard to a Computed Field

When a user direct-fills a form document, he or she answers questions by clicking on a field and entering the answer in the field. Sometimes, however, the user may not be able to enter an answer in the field, either because the field requires other variables be answered to calculate its answer, or because it’s conditioned on another field’s answer in the document. To help users answer the questions necessary to fill in the field, you can assign an answer wizard to the field. An answer wizard attaches an fieldwizard00412.jpgAnswer Wizard button to the field that, when clicked, displays a pop-up inter­view asking the required questions.

Because the Name field contains a computed value, you will attach an answer wizard so users can enter answers for the employee’s first, middle, and last names. The computation attached to that field will then combine the names and merge them into the field. Without an answer wizard, clicking that field during assembly would reveal a grayed, or disabled, field that would not allow users to enter an answer.

To attach an answer wizard to the Name field

  1. Select the Employee LFM Name field.

    To access the Field Properties dialog box, you can also select a field and press Alt+Enter.

  2. Click the properties00415.jpgField Properties button. The Field Properties dialog box appears.
  3. At the Type tab, click the fieldwizard00418.jpgWizard button. The Answer Wizard Field dialog box appears.
    inset_10100421.png
  4. Select ASK Dialog.
  5. Click the Dialog drop-down button and select Employee Information.
    inset_5900422.png
  6. Click OK at the Answer Wizard Field dialog box. An ASK instruction is inserted in the Wizard box.
    inset_5400423.png
  7. Close the Field Properties dialog box.

Assign DEFAULT Answer Wizards to Fields

In the previous section, you attached an answer wizard to the Name field. There are a number of other fields in your template where answer wizards are recommended. For example, conditioned fields like those in the Medical History section typically use answer wizards to aid users in answering all of the required conditions for the field. The Beneficiary Designation tables could also use an answer wizard, which would allow the user to enter as many beneficiaries as needed, even if they do not all fit in the allotted space on the form. (Additional answers would be sent to an addendum.)

Instead of using a specific dialog as the answer wizard for these fields as you did with the Name field, you can use the DEFAULT answer wizard. HotDocs will then auto­matically ask any dialogs necessary for those fields.

To assign the DEFAULT answer wizard to multiple fields

  1. On the first page of your template, make sure no existing fields are selected by clicking on any white space.
  2. Press and hold the Shift key while clicking each of the following fields:

    Employee Age

    Explain Smoking

    Explain Heart Trouble

    Explain High Blood Pressure

    Explain Diabetes

    Explain Immune Disorder

    A selection box appears around each of the six selected fields.

  3. Click the properties00424.jpgField Properties button. The Field Properties [Multiple] dialog box appears.
  4. Click the answerwizard.jpgAnswer Wizard button next to the Wizard field. The Answer Wizard Field dialog box appears.
    inset_6400429.png
  5. Select DEFAULT from the Contents group, and then click OK. The default answer wizard is inserted in the Wizard box.

To assign a DEFAULT answer wizard to the beneficiary tables

  1. Select the Beneficiary Designation table at the bottom of the first page.
  2. In the Field Properties dialog box, click the answerwizard00430.jpgAnswer Wizard button next to the Wizard field. The Answer Wizard Field dialog box appears.
    inset_10200433.png
  3. Select DEFAULT from the Contents group, and then click OK. The default answer wizard is inserted in the Wizard box.
  4. Repeat steps 1–3 for the Beneficiary Designation table at the top of the second page.
  5. Close the Field Properties dialog box.

Assemble a Form Document Using Direct-Fill

Your form template is now nearly complete. You can check your progress by test assembling it using direct-fill assembly, where you enter answers directly in the form fields instead of a separate interview. (You will learn how to create an interview in the next lesson.)

Even if you decide to provide an interview for your template, users still have the option of using direct-fill assembly, so you should test your templates using direct-fill to ensure that they work as expected.

As you develop your own form templates, you may decide that direct-fill assembly meets your needs for some templates, while other more complex templates may require an interview to help guide the person filling out the form.

To test assemble a document using direct-fill

  1. Click the testassemble00434.jpgTest Assemble button. A test assembly window appears, displaying the Form Document tab.
    inset_6000437.png
  2. In each field, enter an answer. To move to the next field, press the Tab key (or click the desired field with the mouse).

    If a field is grayed (disabled), its answer is either the result of a computation, or it is conditioned upon the answer for another variable. To enter answers in these fields, click the fieldwizard00438.jpgAnswer Wizard button (or press F5) and answer questions in the pop-up dialogs.

  3. When you are finished, choose Close (File menu) to close the test assembly window.

Conclusion

You are now finished with this lesson. In it, you learned how to group variables to create custom dialogs, and how to customize the titles and prompts displayed in those dialogs. You also learned how to customize the appearance of default dialogs—dialogs created during assembly for variables that are not included in a custom dialog. Finally, you learned how to create answer wizards for fields and test assemble the template using direct-fill assembly.

Click the save00441.jpgSave Form button to save the template. If you do not want to go on to Lesson 10 at this time, choose Exit (File menu). Then exit HotDocs.