Cognito-forms – Dynamically displaying content entered into a repeating section on a subsequent page

cognito-forms

I'm creating a form where organizations can report on a number of different training positions which they provide. These training positions are called 'posts'.

On the first page of the form, users enter basic information about their posts, e.g. the 'post number'. I've set this up as a repeating section, as one organization may have multiple posts.

On the second page of the form, users need to enter more specific information relating to each of the posts they'd previously listed.

Because of this, I'd like some of the information entered in the repeating section to be automatically populated here. For example, if a user lists three different posts in the repeating section on the first page, then the second page should display the details they entered for all three posts, with extra fields where they can provide further information for each.

Essentially, I'm trying to dynamically create content and fields on one page based on what was entered in the repeating section on the previous page.

Is this possible?

Best Answer

You can use the following to Print the records from page 1 to page 2.

=Form.FORMNAME.REPEATINGSECTIONAME.Where(ItemNumber =1).Select(FIELDNAME)+ Form.FORMNAME.REPEATINGSECTIONAME.Where(ItemNumber =2).Select(FIELDNAME)....N

This formula will be in each of your fields you want to be populated on the second page. You will need to repeat this for as many possible items you may have in you repeating section (Page 1). All your dynamic areas will need to be set to a condition to dynamically appear (for each):

=Form.FORMNAME.REPEATINGSECTIONAME.Where(ItemNumber =1).Contains(FIELDNAME!= null)

I hope this helps!