0 Replies Latest reply on Oct 26, 2015 2:26 PM by Jisa

    Multiple form fields visible/hidden on checkbox selection, and visibility state saves/reopens




      I'm having some problems with a form, all users of this form have Acrobat Pro XI and most users are on Windows, though a few (including myself) are on Mac.


      I have a group of 4 checkboxes all named "Type" with different Export Values (WDP, ASP, WSP, SSP) that run a JavaScript on Mouse Up to set the visibility of 2 text fields (ASPText, SSPText) and one radio button group (TextRadio). Each Mouse Up script is some variation of this:


      this.getField("ASPText").display = display.visible;

      this.getField("SSPText").display = display.hidden;

      this.getField("TextRadio").display = display.visible;


      The ASP and WDP scripts are identical and show two fields while hiding one, the SSP script shows a different field and hides one, and the WSP script hides all fields.

      All fields are hidden by default.

      All three fields are on top of each other, occupying the same outlined space on the form.


      The visibility works as intended, but the problem I'm experiencing is that the visibility state of the fields is not saving with the PDF. When I save and reopen the form, all three fields are visible (which looks awful with one text field on top of another), and I have to unselect and reselect the appropriate checkbox again.


      Is there a different way of tacking the visibility of fields that will save and reopen in the same state? I was thinking of maybe using a validation or calculations script on the fields themselves referencing back to the Export Values of the checkboxes, but I have no clue if that would work, or how to go about it.


      Any assistance would be greatly appreciated!