Using master page in fragment | Community
Skip to main content
Level 2
October 14, 2020
Solved

Using master page in fragment

  • October 14, 2020
  • 1 reply
  • 702 views

Hi,

in a AEM Forms document I use a fragment (let's call it A), which also includes the master pages where there is a title (let's call it H) to be placed at the top of the pages.
Through a for loop I create n instances of A (with addInstance method). Each of these instances of A can be x pages, with x variable. How can I associate a growing number with H for each instance of A?
That is, "text of H" + "1" on the pages of the first instance of A, "text of H" + "2" on the pages of the second instance of A, etc

Best answer by Shubham_borole

Hi @utente2 

 

I am little new to AEM forms as well. But based on my understanding, you must be using Designer to create appropriate XDP forms for your use case forms.

 

In that XDP, you can add XFA scripts. In the script you can add logic to add a counter based on the instance of the title H. And next time H is found you can keep adding a number to it.

 

Similarly in the XDP we can add JS function as well.

 

Please add more details on what you may have tried to get more context.

 

Also this can be a question in AEM Forms community forum.

 

Regards

 

 

1 reply

Shubham_borole
Community Advisor
Shubham_boroleCommunity AdvisorAccepted solution
Community Advisor
November 24, 2024

Hi @utente2 

 

I am little new to AEM forms as well. But based on my understanding, you must be using Designer to create appropriate XDP forms for your use case forms.

 

In that XDP, you can add XFA scripts. In the script you can add logic to add a counter based on the instance of the title H. And next time H is found you can keep adding a number to it.

 

Similarly in the XDP we can add JS function as well.

 

Please add more details on what you may have tried to get more context.

 

Also this can be a question in AEM Forms community forum.

 

Regards