Add a Button that Runs a Computation Variable
You can add a button to a HotDocs dialog that processes a Computation variable. This may be useful if you want to perform a calculation or other type of command and have the result immediately take effect. For example, you can write a computation that sorts a list of answers in a repeated dialog and place a button on the repeated dialog that runs the computation. Then, when users enter answers in the dialog, they can press the button to sort the answers alphabetically.
To add a button that runs a Computation variable
- Open the dialog in the Dialog Editor.
- In the Additional text box, type @COMPUTE:computationName:buttonText.
- Replace computationName with the name of the Computation variable you want to run.
- Replace buttonText with the text which will appear on the button.
- Drag the additional text to the Contents box, placing it where you want the button to appear on the dialog.