Copy link to clipboard
Copied
Hi Guys and Gals,
Is it possible to move groups of fields to different layers?
I want to have a group of fields relating to "settings" (e.g. Listbox items) on a separate layer from the main form fields
Louis
Copy link to clipboard
Copied
Basically, no. Fields and layers exist on different parts of the file and are unrelated one to another.
However, I recall that there was some sort of hack that allowed one to associate fields with a specific layer, but I can't remember how it was done, or if still works.
One other solution is to write a script that shows/hides the desired layer and at the same time shows/hides the fields that belong with it.
Copy link to clipboard
Copied
try67 is very likely referring to the method outlined here: The Acrobat Ninja: Preflight Layers in Acrobat Pro
As you can see, I have to use the Internet Archive's Wayback machine to access this page - it's no longer available in it's original location.
I've never tried this myself with form fields - mainly because the process is pretty cumbersome and slow - I think changing the visibility of form fields based on which layers are visible is a better (and easier to implement and maintain) approach.
Copy link to clipboard
Copied
It's also buggy. OCGs were introduced after form fields and I don't believe much work was ever done with Acrobat/Reader so that it behaved in a consistent and defined manner when annotations were assigned to OCGs.
Copy link to clipboard
Copied
It may actually be even better to avoid OCGs at all, and do everything with fields. Place the "contents" as the icon in a big button field, and the show/hide logic will become much simpler.