I suppose that this ultimately can apply to objects as well as pages. At the moment though, I'm really more concerned with pages and subpages.
I want to hide/show multiple pages based on a drop-down menu selection. I have of course searched regarding this subject. Nobody seems to be quite asking for what I'm asking, and the most closely related questions only answer for a single object rather than multiple.
I have a dropdown menu that, depending on the selection, certain pages and subpages which were previously hidden become visible. However, I am trying to build in a certain forgiveness, so that if someone accidentally selects the wrong item on the dropdown menu and goes back to correct themselves, either (1) all of the associated pages will go back to their default state of hidden, before continuing forward and making certain selections visible, or (2) each object is manually named and told to go back to being hidden.
I'm aware that this is seen as inelegant in and of itself, but given the overall design of the sheet, the naming scheme, etc, there's really no way to have the system call all pages or subpages starting with the same letters and such. So I'd have to name each one individually. And that's fine! But I've tried a million methods to no avail. I just want a more condense way to hide/make visible multiple pages and subpages simultaneously, or barring that to reset the visibility to the default.
So, I've been using Radzmar's solution for a while now, and that solution works very well up to a point. However, it begins to become ungainly as the number of subforms which must be addressed grows larger (I'm currently at 50, and it'll only go up).
What would be significantly easier is if I could say "This form AND ALL subforms below it in the hierarchy" presence = hidden.
Let's say my hierarchy was as follows:
Page 1 is where selections are made to build the document. But if somebody makes a mistake, they can choose something else and in doing so, hide all the old info. Some selections may end up with more pages than others, so as a result, I need to be able to code something where
1. Change in dropdown menu occurs
2. Page 2 and all subforms and all subsubforms presence set to hidden
3. Page 3 and all subforms and all subsubforms presence set to hidden
4. Page 4 and all subforms and all subsubforms presence set to hidden
What would be better is if I could set an exception to that. For example, I have a subform which is set to visible on all pages regardless of if the page is hidden or not. That's because it contains elements like a digital signature which can not be put into a Master Page.
However, in the choice between growing that named array ever longer, element by element, or having something clean and clear and just telling it to make two subforms visible instead of one when a page is called up, I would prefer the latter.