Skip to main content
shay516055186
Participating Frequently
February 2, 2021
Answered

forms

  • February 2, 2021
  • 2 replies
  • 1584 views

I have hundreds of PDF files edited as forms. The forms contain a button that is linked with javascript code. Is it possible to make a sweeping change in all the code of the files, without entering each file individually

This topic has been closed for replies.
Correct answer try67

there is a button called "botton1" which contain java script code,

i want to change the code in it


It's actually called "Button1". It's important to use the correct field name.

If you have Acrobat Pro you can do it by running an Action on the files that executes the following JavaScript command:

 

this.getField("Button1").setAction("MouseUp", "NewCodeGoesHere");

 

Replace "NewCodeGoesHere" with a string representation of the new code to use.

2 replies

BarlaeDC
Community Expert
Community Expert
February 2, 2021

Hi,

 

Are you able to share a file so we can see the make up as it may or may not be possible? (It probably isn't going to be easy though)

 

Malcolm

shay516055186
Participating Frequently
February 2, 2021
try67
Community Expert
Community Expert
February 2, 2021

Depends. What kind of change?