Skip to main content
Known Participant
August 11, 2025
Question

Code that worked previously no longer working

  • August 11, 2025
  • 2 replies
  • 125 views

I have a form, "Form A" that I created a few months ago. On Form A, I have image buttons set to "Hidden" that will either stay hidden or will display based on a variable "Total" field.

 

I have created a new form, "Form B," where I've attempted to do the same thing: insert image buttons set to "Hidden" that either stay hidden or toggle to visible based on a variable in the "Total" field.

 

I cannot get Form B to do the same thing that Form A does. I have even changed the image button names and changed the Total field to the exact same settings in Form B that I had in Form A- and it doesn't work in Form B, though it still works in Form A. I have even copied the image buttons containing the JavaScript from Form A and pasted them into Form B. But the debugger on Form B shows me syntax and XML naming errors.

 

Has this happened to anyone else?

 

Best regards,

Christine

2 replies

Thom Parker
Community Expert
Community Expert
August 11, 2025

Lots of people have issue when copying functionality between PDFs. But we'll need some specific information to help you solve the problem. Please show us the error messages and either post the problem form, or the problem code. 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Bernd Alheit
Community Expert
Community Expert
August 11, 2025

What script do you use?