Apply JavaScript Actions to All PDF Form Fields in Adobe Acrobat
Question details
Apply the same Mouse Enter and Mouse Exit JavaScript actions to PDF form fields in Acrobat.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- The user wants newly created or existing form fields to run the same JavaScript actions when the pointer enters or exits a field.
- Observed behavior
- Acrobat does not save form-field actions when the user selects Use current properties as new defaults.
Open the PDF in an Acrobat version that supports form editing and JavaScript, and check that the document permits changes. Decide whether you need to copy actions to new fields or update fields that already exist.
Copy a Form Field That Already Has the Required Actions
Use a configured field as a template when creating new fields with the same actions.
Open the PDF in Acrobat, select Prepare a form, and open the properties of a field. On the Actions tab, add the desired JavaScript for the Mouse Enter and Mouse Exit triggers.
In Prepare a form, select the configured field and use Copy and Paste to create another field. Move the copy to the desired location.
Open the copied field's Properties and give it a unique name if it should hold an independent value. Close form editing and move the pointer over and away from the field to test both actions.

Set Actions on Existing Fields with the Acrobat JavaScript Console
Use a console script to update existing fields in one pass, particularly when many fields need the same actions.
Work with PDFs and Office Files in WPS Office
WPS Office is a free, lightweight alternative for everyday document and PDF work, with a familiar interface and compatibility that makes moving existing Office files straightforward. It does not set Acrobat-specific form-field JavaScript actions.

Frequently Asked Questions
Can I save field actions as Acrobat's default properties?
No. Use current properties as new defaults does not include form-field actions. Copy a configured field or apply actions with Acrobat JavaScript instead.
How do I apply the actions only to certain fields?
In the console loop, check each field's name before calling setAction(). For example, use a shared naming prefix to identify the fields you want to update.
Will copying a field also copy its value behavior?
Fields with the same name can share a value. In Prepare a form, open the copied field's Properties and give it a unique name if it needs an independent value.
Do console-applied actions carry over to fields I create later?
No. The loop updates fields that exist when it runs. Copy a configured field for new fields or run the script again after adding them.
Can WPS Office set these Acrobat JavaScript actions?
The setAction() workflow described here is an Acrobat JavaScript feature. WPS Office can be used for other PDF and Office document tasks, but it does not perform this Acrobat-specific action setup.




