Use JavaScript Actions

When you create a form field, you can use the Run A JavaScript Action command to create a custom script for the field. You can use the JavaScript Action to create JavaScript code and assign it to a button for use as navigation. You can also use JavaScript to augment Acrobat mathematical functions.

Use JavaScript to Subtract and Divide

In the section “Calculate Form Fields,” you may have noticed Acrobat doesn’t provide the capability to subtract or divide form fields. To perform either operation, you must use the JavaScript Action to create JavaScript code. To subtract a text field named Field B from a text field named Field A, follow these steps:

1. Select the Text Field tool.

2. Create a form field where you want the results ...

Get How to Do Everything Adobe Acrobat X now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.