Expand my Community achievements bar.

Hidden Pages

Avatar

Former Community Member
I have a 15 page form that is broken into 4 sections. I also have 4 buttons for navigation to those sections. These buttons are located on the top of the Master pages. The problem I am having is that when I set the presence of one sections pages to hidden, the pages still show up but with only the navigation fields on top. I have also tried to put the navigation directly on the pages but still get blank pages showing up (4 pages with content and 11 blank pages). How do I set the presence of the pages so that it will only display the visible ones? Here is my code.



xfa.form.form1.pPg1.presence = "visible";

xfa.form.form1.pPg2.presence = "visible";

xfa.form.form1.pPg3.presence = "visible";

xfa.form.form1.pPg4.presence = "visible";

xfa.form.form1.pPg5.presence = "visible";



xfa.form.form1.fPg1.presence = "hidden";

xfa.form.form1.fPg2.presence = "hidden";

xfa.form.form1.fPg3.presence = "hidden";



xfa.form.form1.oPg1.presence = "hidden";

xfa.form.form1.oPg2.presence = "hidden";

xfa.form.form1.oPg3.presence = "hidden";

xfa.form.form1.oPg4.presence = "hidden";

xfa.form.form1.oPg5.presence = "hidden";



xfa.form.form1.sPg1.presence = "hidden";

xfa.form.form1.sPg2.presence = "hidden";
2 Replies

Avatar

Former Community Member
Check that you have allowed your pages/subforms to flow. The form must be able to grow and shrink. Your "position content" subforms containing the form objects should be wrapped in subforms that are "flow content".

Avatar

Former Community Member
Hi,



Use the instanceManager to remove / hide pages:




form1.page_2.occur.min = "0";

form1.page_2.instanceManager.removeInstance(0);





Replace
form1.page_2 with the somExpression to match the page to hide.

Instead of




form1.page_2.instanceManager



you can also use




form1._page_2



But I don't like it because variables beginning with an underscore imply being global variables. Which they apparantly aren't in this special case.



Regards,

Steve