Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Creating a Form with multiple duplicate pages

Avatar

Level 2

Hey all, 

 

I'm new to AEM forms designer, so maybe this is a small oversight, but hopefully someone can help me out!

 



I need to create running daily log form document. Each form takes up one page, and can flow into a second if need be, and 2 logs per day (AM/PM). I've got the basic form created, but my issue is figuring out how to make multiple pages of that same form within one document. 

 

I have copied and pasted the form to separate pages in the meantime, however I keep running into issues. 

 

So I have two questions really: 

 

Question 1: is there a quicker/more direct way to duplicate a form to make a larger document than copying and pasting? I've tried figuring out a way to duplicate the pages in Acrobat but because it's an xml form this can't be done it seems. 

 

Question 2: The biggest issues I've come across with my form is with a button adding new rows to a table. I've set my form up to choose a goal from a drop down list, and then a text box to write into. I put these together as a 2 table rows, then created a button to add more of the grouped rows as needed. 

 

All seemed to be working well until I opened it in acrobat and converted it to a reader friendly document. Then all of a sudden on the first page, i'll get multiple table rows showing up instead of the just one. It only does it on that first page. There should be just one visible table row per form, with the button to add more, and it appears to be working in AEM, but not the case in reader. 

Any thoughts on what I'm doing wrong here or a better way to go about this? 

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

 

to start with XFA forms, you should check this source. It hat many useful samples.

http://assuredynamics.com/index.php/code-solutions/

 

You can repeat pages of your form the same way as you do with table rows. Both are technically subforms and can be set to have multiple occurences. Those will include all nested elements like fields, images and buttons. To avoid those unwanted repeats later in Acrobat/Reader you'll have to be consistent with the way you're naming subforms and fields and how you set up there data bindings.To repeat portions of a form quickly during design process in Designer, use its Fragments feature: Simply right click the element in question and create a fragment of it which you then can drag'n drop into other places of the form from the fragment catalogue.

radzmar_0-1708458944036.png

 

View solution in original post

4 Replies

Avatar

Community Advisor

For the first question: do you mean to create multiple copies of the first page at design time or after rendering the form?

At design time you can add new subforms and fields to design the form or copy/paste the existing component available on the form.

or Use the instance manager to repeat the subform/table on multiple pages.

 

For the second question, please check the data binding property for the table, have you set the initial count to some value?

 

Avatar

Correct answer by
Level 10

Hi,

 

to start with XFA forms, you should check this source. It hat many useful samples.

http://assuredynamics.com/index.php/code-solutions/

 

You can repeat pages of your form the same way as you do with table rows. Both are technically subforms and can be set to have multiple occurences. Those will include all nested elements like fields, images and buttons. To avoid those unwanted repeats later in Acrobat/Reader you'll have to be consistent with the way you're naming subforms and fields and how you set up there data bindings.To repeat portions of a form quickly during design process in Designer, use its Fragments feature: Simply right click the element in question and create a fragment of it which you then can drag'n drop into other places of the form from the fragment catalogue.

radzmar_0-1708458944036.png

 

Avatar

Level 2

Thanks! I will try this. I did end up figuring it out but through trial and error and in a slightly more rudimentary fashion! 

 

This should be helpful in the future.

Avatar

Administrator

@BertAn1 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni