Back to List
Placeholder | Replace With |
var | A variable. |
You can use the answered expression to determine whether a HotDocs variable has been assigned a value. If so, the expression receives the value of true.
If you are testing whether a user has answered a variable, you must make sure the variable is presented to the user using a custom dialog. Using the answered expression alone will not automatically force HotDocs to display the variable for the user.
For example, you may place a variable for the second line of an address (ClientAddress2) in a custom dialog; however, not all users will provide information for that variable. In the text of the model, you can surround ClientAddress2 with an if expression that merges that variable into the document—only if the user answers it:
[ClientName;te]
[ClientAddress1;te]
[if:answered(ClientAddress2):[ClientAddress2;te]
][ClientCity;te], [ClientState;te] [ClientZip;te]
In this script, the answered expression is used with an if expression to insert or remove ClientAddress2, based on whether the user has provided that information. (Without it, the default unanswered text, ***ClientAddress2***, would be inserted in the assembled document.)
Back to List