As
part of the form design process, a form developer can use calculations
and scripts to provide a richer user experience. You can add calculations
and scripts to most form fields and objects. For example, the following
JavaScript script multiplies the values of two numeric fields together
and displays the result in a third numeric field:
NumericField3.rawValue = NumericField1.rawValue * NumericField2.rawValue;
At a more advanced level, you can create your own functions tailored
towards your own custom form processing needs.
Designer supports two scripting languages, each geared towards
the needs of a particular type of form developer. FormCalc is a
straightforward, easy-to-use calculation language that is modelled
on common spreadsheet functionality. It includes a variety of built-in
functions designed to reduce the amount of time you need to spend
developing your form design. JavaScript, a powerful scripting language,
provides you with a great deal of flexibility when creating your
scripts and allows you to leverage any existing knowledge of the
language.
Remember that scripting on a form is entirely optional. You can
choose to take advantage of scripting to provide a richer user experience,
but many of the most powerful features available during form creation
are available in Designer without the use of scripts. However, through
scripting, you can manipulate and control almost all aspects of
your form design.
Note:
You can also use the Action Builder dialog box
on the Tools menu to build common interactive capabilities in forms
that have a flowable layout, without writing scripts.