I have a couple of scripts that work fine in both Pro and Reader, but when I Save As -> Reader Extended PDF -> Enable Additional Features, they stop working (in both Pro and Reader). Other scripts in the same form continue to work just fine. I'm at a total loss, and so are my IT folks (who admittedly aren't exactly form/JS/Adobe experts...)
I've been fighting with this problem off and on for a week or so now, and I've tried a couple of different approaches - I'm a JS muddler, and I'm sure there are more effective ways to do what I want to do. But everything I try gives me a different problem . I'm going to try to separate out the different issues in different posts...but I'm getting pretty confused!
For what it's worth, the problem scripts are on the first and last master page, while the ones that work are on regular pages.
The goal is to reuse a partially filled-out form for several different phases of an approval process. Each version gets a different title, and an additional subform is visible during the 2nd, 3rd, and 4th phases.
Here's the overall workflow:
- Phase 1
- The form starts out with the Phase 1 title and with the additional subform "hidden."
- A remote user fills out the form and returns it to the program coordinator.
- Phase 2/3/4
- The coordinator saves a copy of the form with a different name.
- The coordinator checks a "For admin use only" checkbox to display a radio button group. Each option changes the title and sets the additional subform presence to "visible."
- The coordinator unchecks the "For admin use only" checkbox to hide the radio buttons.
The title is in a text field. The scripts change the rawValue of the field for each option.
In this case, I have the following script in both the initialize and calculate events of the text box:
if (S_SelectTitle.S_Actions.RB_SelectTitle.rawValue == 2)
this.rawValue = "Phase 2";
else if (S_SelectTitle.S_Actions.RB_SelectTitle.rawValue == 3)
this.rawValue = "Phase 3";
else if (S_SelectTitle.S_Actions.RB_SelectTitle.rawValue == 4)
this.rawValue = "Phase 4";
else
this.rawValue = "Phase 1";
and similar code in the initialize and calcuate events of the subform to make its presence "visible" or "hidden." (I've used this initialize/calculate event strategy before, it's always worked fine. But I"ve run into problems with it in one of the alternate approaches i've been using on this form, so I"m totally open to other ways of doing it...)
Before I extend the form for Reader, it works fine. The title changes correctly depending on which button is selected, the new subform appears at the end, and the radio buttons go away when the box is unchecked.
After I extend it for Reader, nothing works except the checkbox. The title doesn't change, and the subform never appears.
Help? Thanks in advance!