I've got a doc with an image on it, and form objects (check boxes and text fields) on top. There are several pages of this, and each page is unique and premade.
I would like to make buttons on the first page that would show/hide the other pages, so the user could have just the 1st and the 5th page, for example.
My thought was to have all the pages present, but hidden by default. Then if the user required a page they could click a button and all the script would have to do would be show the correct page.
In my experimentation I've found that I can't get the presence "hidden" to affect anything. I used a messageBox to confirm that the presence status was set to "hidden" but the object in question stays visible, clickable, editable... etc. However, "invisible" does work as intended, but so far only for individual elements. I have not discovered how to hide a full page. Looping through an hiding all the elements isn't sufficient, since the page itself must be hidden.
This is the closest thing to working.
topmostSubform.Page1.textbox1.presence = "invisible";
xfa.host.messageBox("Presence: " + topmostSubform.Page1.textbox1.presence, "Debugging", 3);
I tried this for a page:
topmostSubform.Page2.presence = "invisible";
but nothing happened.
Is there a way to do what I want? What's wrong with "hidden"? Thanks all.
There shouldn't be any challenges in showing/hiding pages using the presence property of xfa forms. I have created a sample for you. Please have a look and let me know if you have further questions on this. Here is the link to the PDF: http://www.filefactory.com/file/46ao9j5jjj3j/PagePresence_pdf
Thanks, Armaghan.