These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Setting Max Rows with addInstanceManager

Gillian
Registered: Jul 10 2007
Posts: 63

I have a table and I am letting the User add or delete rows as necessary using the AddInstanceManager and RemoveInstanceManager.

But I want to do two things:

1. I want to limit the number of rows they can add. I want to set a max number of rows. What code do I need to do this?

2. I want the subform underneath the table to flow down when people are adding rows. When I set the subform to flow, all of the objects in the subform get skewed and look horrible. It moves all of the objects to be left justified, even though they are not supposed to be that way. How do I set the subform to flow without it skewing all of the objects.

Thanks
Gillian

-Gillian

My Product Information:
LiveCycle Designer, Windows
Gillian
Registered: Jul 10 2007
Posts: 63
More on this topic...

I got the form to work with the following code:

Subform1.Table1.Row1.instanceManager.addInstance(1);
Subform1.Table1.Row1.occur.max="6"

But now I want to display a custom message box when the max number of rows is reached because the LCD message is messy for my end-user. How do I get the following message box to only appear when the max number of rows if reached? I think I need an If-Then statement but I am not clear on the syntax.


xfa.host.messageBox ("The maximum allowable number of rows is 6. You cannot add any more rows.");

-Gillian