I have an amendable/Editable PDF form that i'm working on and the top has 3 sections. Only one section can be filled out. All are hidden by default and triggered by 3 buttons. When one is clicked 2 are hidden and the selected one is shown.
Each section has a few form fields. These two are hidden/shown depending on the checkbox shown.
My issue is when you fill out 1/3 sections and save it, the PDF won't save the selected layer. It saves the from fields and shows them upon reopening, however the layer underneath is not shown. If you select the checkbox corresponding to the filled in fields it shows, but I need it to show be default if the fields in that section are filled out.
From my research so far the only way of doing this is to put a javascript function that runs on Document open to see if any fields have values, then show the correct layer accordingly.
However there must be a better way in Acrobat to setup the layers so their default state is updated and visible on open, if it was saved as visible.
Example of form:
[VISIBILE]
1)
- Field 1
- Field 2
- Field 3
[HIDDEN]
2)
- Field 1
- Field 2
- Field 3
[HIDDEN]
3)
- Field 1
- Field 2
- Field 3
Used Javascript to hide/show the 3 sections and field groups associated with those sections.
Then on document Open ran an if statement which finds which section had it's radio button checked when it was last save, if any, and then displays the correct fields and layer for that section.