You can add a JavaScript script
to any form design object that allows calculations and scripts,
including the script object.
Make sure that you have the multiline version of the
Script Editor displayed in the Designer workspace.
Select a field on your form. For example, add a new text
field to your form design.
In the Show list, select a valid event. For example, using
the new text field, select the docReady event.
In the Run At list, select where you want the script to execute.
For example, for the new text field, select Client.
Click the Functions icon or
F10 to display a list of JavaScript functions.
Select the desired function, and press Enter.
Replace the default function syntax notation with your own
set of values. Alternatively, you can create your own script manually
in the Script Source field of the Script Editor. For example, in
the new text field, add the following JavaScript to the Script Source
field:
this.border.fill.color.value = "255,0,0";
Click the Preview PDF tab to test the form. The text appears
red for the new button object when the form is displayed in the
Preview PDF tab.
|
|
|