Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How to add button to insert duplicate page in form

ademk98472089
Level 1
Level 1

Hi All,

I am trying to modify an existing form so that a page can be duplicated by clicking a button. Basically, the form is for a maintenance report and if there are multiple machines being maintained then I would like the user to be able to insert the duplicated pages of the service report required to add the other machines on to the report.

Is this easy to do?

1 Accepted Solution
radzmar
Correct answer by
Level 10
Level 10

Well, principally this is easy. You'll have to make your form flowed and use at least one repeatable subform.

For example: The form contains a subform 'MyPages' which has a flowed layout and contain one subform 'PageToRepeat' that represents the real page of the form with all the fields etc. This subform has to be set to be repeatable under Binding Tab of the Object palette. A button now can add new instances of 'PageToRepeat' with a short script:

_PageToRepeat.addInstance(true);


1055458_pastedImage_0.png

View solution in original post

6 Replies
radzmar
Correct answer by
Level 10
Level 10

Well, principally this is easy. You'll have to make your form flowed and use at least one repeatable subform.

For example: The form contains a subform 'MyPages' which has a flowed layout and contain one subform 'PageToRepeat' that represents the real page of the form with all the fields etc. This subform has to be set to be repeatable under Binding Tab of the Object palette. A button now can add new instances of 'PageToRepeat' with a short script:

_PageToRepeat.addInstance(true);


1055458_pastedImage_0.png

View solution in original post

fogharty
Level 2
Level 2
I have followed the instructions here, but it simply puts the "PageToRepeat" on the same page. Is there a way to get it to go onto a new page entirely?
Kosta_Prokopiu1
Employee
Employee

Hi, use the Pagination "Top of next Page" on the PageToRepeat. If that is not set it flows on the same page as in this example the subform fits multiple times.

fogharty
Level 2
Level 2
I tried that, unfortunately it puts a blank page before the PageToRepeat.
Magus069
Level 10
Level 10

Hi there,

 

I am not sure exactly how your form looks like, but after testing a few things, seems like the best thing you can do, would be having that repeatable page with content flow setting as "Positioned" and to use the space of the whole page to be able to make it start next page...

Unless you'd be able to make that repeatable page to be included inside the first page a subsequent subform and set the pagination "Top of Page" for that repeatable subform, then it would start on each following page for every instance.

 

fogharty
Level 2
Level 2

"change the Pagination to "Top of Page" instead..."

 

thank you, but that still produces a blank page.

It may have something to do with my Master pages.

i posted a detailed question in this forum