I have a form that has 2 functions - show a hidden page and duplicate the Page 1 and I need to reorder the pages once the user has added an instance or shown a page. I have Form A (Page 1) that can be duplicated but the user can add in a Form C (extra page) to be attached at the end of that instance of Form A. So it goes like this:
Form A (Page 1)
button 1 - Adds new page 2 "Form C" to end of that "Form A"
if (CompleteFormC.rawValue == 1) then
topmostSubform.FormC2.presence = "visible"
xfa.host.pageDown();
else
topmostSubform.FormC2.presence = "hidden"
endif
button 2: Adds a new instance of "Form A"
topmostSubform.FormA.instanceManager.addInstance(1);
xfa.host.pageUp();
Currently, it adds the Form C to the very end, like so:
I am trying to reorder the pages so the user can add in a Form C to every instance of Form A, like so:
It's a little complicated but I would appreciate any help at all!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
you can't swap rows / instances between different objects..
If you want to have Form A and Form C right after, you must have Form A and Form C in the same page, so when you add instances they will always be together.
All you need to do is show or hide the Form C when it is needed...
Views
Replies
Total Likes
Hi,
you can't swap rows / instances between different objects..
If you want to have Form A and Form C right after, you must have Form A and Form C in the same page, so when you add instances they will always be together.
All you need to do is show or hide the Form C when it is needed...
Views
Replies
Total Likes
Ahh, thank you. I just moved Form C into Form A subform group, it works and stays attached to that instance of Form A. Here's another issue... now that I have Form C appended to Form A, when I add in another Form A it correctly gets added after the last Form C but how can I get the form focus to go to the top of that new instance of Form A?
Currently I am using: xfa.host.pageDown()
But now it would be skipping down a few pages. Is there a way to also move to the top of that new instance?
Thanks!
Views
Replies
Total Likes
Hi, to be able to switch to the right page you can also use this:
to focus on a specific page go like this:
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies