top of page

16. Pop-up Prompts on Dialogs

Description

Have a dynamic message appear on your dialog box to guide or warn the user.

Code

(Place the following in the dialog script)

SET Message-t TO ""
IF TrueFalse
SET Message-t TO "You have selected Yes. Are you sure?"
ELSE IF NOT TrueFalse
SET Message-t TO "You have selected No. Are you sure?"
ELSE
SET Message-t TO ""
END IF

Explanation

With HotDocs Pro, it is possible to pop up a dynamic warning on a dialog. This method isn't in any of the manuals, so it probably isn't supposed to work, but it seems to work for me.

Create a dialog, and place into it the variable you want to test (any type) and a text variable that will hold the message.

The above example tests a true/false variable, TrueFalse, and gives different messages based on the user's choice. The message is set in the text variable Message-t. The script initially sets the message's value to an empty string so that nothing will be displayed. As you change the value of this variable, the new value is dynamically displayed on your dialog.

IMPORTANT: When you create the message variable Message-t, place only the symbol @ in the prompt box. This will prevent any prompt from displaying. You'll probably also want to select "Ask only in dialog", "Don't warn if unanswered", and "Don't save in answer file" under the Advanced options.

TIP: By changing the Number of Lines value for Message-t, you can adjust the amount of space allocated to the prompt on the dialog box.

Why this works: Three conditions must be in place for this to work well. First, you must suppress the text variable's prompt with the @ symbol. Second, you must put that variable in a dialog. And third, you must SET that variable's value in the dialog's script. If you do all of the aforesaid, HotDocs will display the text directly on the dialog box instead of in a text box. This may well be a bug or an anomaly, but it works great.

bottom of page