Hi =)
I'm having some trouble with a dynamic xml form I'm creating.
Inside a page I have a repeating table that allows the user to insert a new row (max 4 rows).
All I want is this page to adjust nicely to the size of the repeating table.
Since I've read that it is not possible to change master page size through javaScript, I've created a page set with different sized master pages that adjust to the different number of rows.
I tried to set some conditional breaks to change from master page to master page accordingly to the table size. The thing is, whenever the user adds a row, the two master pages will appear. The first one blank and the next one with the table.
I think I only need a way to make the previous master page disappear.
Can someone give me some advise?
I need help.
Thank you =)
Views
Replies
Total Likes
Hi =)
I'm trying something different: I want to make the blank pages disappear by changing the position of the Pages in the Page Set.
Suppose the table only has 2 rows.
The script on the click event of the button "add row" is the following:
//Adds an instance to the row
form1.page1a.Table1.Row1.instanceManager.addInstance(true);
//Counts the number of instances
var n = form1.page1a.Table1.Row1.instanceManager.count;
//If number of instances = 2 then the Pages position is changed
if (n == 2){
xfa.form.form1.page1a.pageSet.Page1.pagePosition = "rest";
xfa.form.form1.page1a.pageSet.Page2.pagePosition = "first";
}
I also have a conditional break in the Table1 like this:
"When"
form1.page1a.Table1.Row1.instanceManager.count == 2
"Break"
before
"to"
Page2
This forces the entire table to change to the Page2 once it has 2rows.
The only thing that ruins this brilliant idea (cof cof =P) is...well, are this commands:
xfa.form.form1.page1a.pageSet.Page1.pagePosition = "rest"
xfa.form.form1.page1a.pageSet.Page2.pagePosition = "first";
They don't work! Why? Does anyone know?
Thanks =)
Views
Replies
Total Likes