Expand my Community achievements bar.

SOLVED

Repeating Forms

Avatar

Former Community Member

I have a form that has 6 pages. some of these pages are repeatable and I am trying to make it so that the entire form is repeatable. I use xml input such as:

<Root>
<page1/>
<page2/>
<page3/>
<page3/>
<page4/>

<page4/>
<page5/>
<page1/>
<page2/>
<page3/>
<page3/>
<page4/>

<page4/>
<page5/>
</Root>

But instead of getting the pages as is specified by the XML I get the two forms combined and some pages misssing


page1 [1]
page2 [1]
page3 [1]
page3 [1]
page3 [2]
page3 [2]
page4 [1]

page4 [1]

page4 [2]

page4 [2]

page5 [1]

I am not sure where to go from here and I appologize for being vague.  I have a copy of the form and XML that show this if anyone can take a look.

Thanks

Cameron

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Not sure if this would work but what if you wrapped all of the page subforms into a subform of their own (representing the form). So it would come out:

<root>

     <form1>

          <page1/>

          <page2/>

              |

              |

             V

     </form1>

     ,<form1[1]>

          <page1/>

          <page2/>

               |

               |

              V

     <form1[1]/>

</root>.

View solution in original post

3 Replies

Avatar

Correct answer by
Former Community Member

Not sure if this would work but what if you wrapped all of the page subforms into a subform of their own (representing the form). So it would come out:

<root>

     <form1>

          <page1/>

          <page2/>

              |

              |

             V

     </form1>

     ,<form1[1]>

          <page1/>

          <page2/>

               |

               |

              V

     <form1[1]/>

</root>.

Avatar

Former Community Member

Thank you that fixed it.  The only problem I have left now is that my page numbers are based on the document as a whole, not the individual instances of the new subform.

The paging is defined in the master pages, which are outside the subform, and I was getting the page using xfa.layout.pageCount() which is obviously wrong just based on the name.  Do I need to move the page numbering to be within the subforms or can it stay on the master pages? Any thoughts?

Thank you

Cameron

Avatar

Former Community Member

If you set your form level subform to flowed, then each of  your page subforms will have a Pagination tab available. You can control where you want it to appear in the Place dropdown. I would set it to "Top of Next Page".

screen1.png

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----