LiveCycle Designer ES provides a wide range of calculation and scripting features that you can use to perform a variety of tasks. For example, the following script changes the color of a text field border and the font size of the text field value:More complex forms can take advantage of scripting to perform data source connectivity and data manipulation at run time. For examples of common scripting tasks, see “Examples of Common Scripting Tasks”.Creating calculations and scripts in LiveCycle Designer ES involves following a general process each time you attach a calculation or script to an object. Although not all aspects of the process are required each time you create a calculation or script, following the process helps to eliminate potential errors and unexpected results.
• Select the object to which you want to attach a calculation or script. Although you can create calculations and scripts that manipulate almost any object on your form design, not all form design objects support form events. For a list of standard objects included in the Object Library palette in LiveCycle Designer ES that support scripting, see “Objects that support calculations and scripts”.
• Select the form event to which you want to assign the calculation or script. The calculation or script associated with an event executes each time the form event triggers. For example, calculations or scripts attached to the click event of a button trigger each time the form filler clicks the button while filling the form.
• Choose the scripting language you want to use. Depending on the form you create, you may decide to use only FormCalc, only JavaScript, or a mixture of both languages. You can only use one scripting language on a particular instance of a form object event.
• Choose where the calculation or script runs, either on the client application, such as Acrobat or Adobe Reader, or on the server using LiveCycle Forms ES.