Skip to main content
Participant
October 25, 2017
Question

Using Acrobat Pro DC, issues with javascript saving

  • October 25, 2017
  • 1 reply
  • 524 views

I am using Acrobat Pro DC to make a form. The form has a section that is divided into 2 areas which are controlled by radio buttons that are in the same group. When radio1 is selected we want the entry fields in area 1 visible and the entry fields in area 2 hidden. And when radio 2 is selected we want the entry fields in area 2 visible and the entry fields in area 1 hidden. We are using javascript on mouse up actions to accomplish this in acrobat. Everything is working as expected in the preview in acrobat. My issue is that in the saving process it seems that all the javascript is being stripped out. When I go to reopen the file in Acrobat pro, all the fields are still there but there is no javascript attached to them. Is there something that needs to be done or set for the javascript to be saved at the field level?

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
October 25, 2017

Not really... However, it's not possible to save a file using a script that's only located within that file itself. It requires placing a trusted function in a folder-level script and then calling it from the script that's in your field, but that's another issue.

Are you editing the code using the Edit All JavaScripts window, by any chance? If so, don't!

Participant
October 25, 2017

I am not using the Edit All Javascripts window. I am entering the scripts within the actions tab on the field's properties panel. I am then saving the file like you normally would with the file-> save. So the script is not saving anything, it's just that the script I am writing in the actions tab to hide/show the desired fields is not being saved.

try67
Community Expert
Community Expert
October 25, 2017

Very strange... Can you post your script and/or share your file?