Expand my Community achievements bar.

SOLVED

addInstance & Hidden Page

Avatar

Level 2

I have a form with the last page set to hidden.

I have a button on the last visible page ( Page 4) set to Page5.presence = "visible";

This shows the 5th page. Works Great until this point.

When I click the button on page 5   topmostSubform.Page5.instanceManager.addInstance(1);    another page is not added.

I know it works with a visible page, but how do i overcome this issue with hidden pages ??

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi,

So, how do you make the Page - 5 invisible? Is it through the object panel by setting the presence to invisible/exclude from layout or by scripting in the docReady event?

Try the following.

Instead of making the Page - 5 invisible through the object panel, please write the script in the docReady event of the page as this.presence = "hidden". Then in the click event of the button write the script for adding an instance.

Thanks,

Bibhu Bikash Nayak,

www.mindfiresolutions.com

Specialist Services in LiveCycle Forms and Server Development.

View solution in original post

4 Replies

Avatar

Level 4

Hello,

Try this. First make sure your form is saved as a dynamic for so it can change as you add or

subtract data or elements to the document. Next make sure the sub form is set to repeat for

each data item. You do this by selecting the sub form and selecting the Binding tab in the

Object pallet and checking the box that says "Repeat Subform for each Data Item".

And your script is right.

Thanks,

Debadas.

Avatar

Correct answer by
Level 9

Hi,

So, how do you make the Page - 5 invisible? Is it through the object panel by setting the presence to invisible/exclude from layout or by scripting in the docReady event?

Try the following.

Instead of making the Page - 5 invisible through the object panel, please write the script in the docReady event of the page as this.presence = "hidden". Then in the click event of the button write the script for adding an instance.

Thanks,

Bibhu Bikash Nayak,

www.mindfiresolutions.com

Specialist Services in LiveCycle Forms and Server Development.

Avatar

Level 2

That is exacly what I thought of on the drive home this morning.

I put this in form ready:

if ((ImageField.rawValue == null))

then Page5.presence = "hidden";

else Page5.presence = "visible";

endif

Would Doc Ready be better then Form ready? ( Not really sure the difference to be ready?

Avatar

Level 9

HI,

I guess docReady would be better than FormReady as when the form is opened docReady event  fires.

Thanks,

Bibhu Bikash Nayak,

www.mindfiresolutions.com

Specialist Services in LiveCycle Forms and Server Development.