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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Copy same detail in the subsequent pages

rakeshk21205956
Level 3
Level 3

Sir,

 

I am making a AEM form with a cover page which has a repeating SubForm, inside SubForm (SF) there are text fields,  a checkbox and also Add & delete button.   Now i  want when user checks the checkbox, the same SF is copied to the subsequent page at a specified point.

So, initially there is 1 sub form and when user after filling that sub form checks the checkbox, then same information should be inserted or copied to the subsequent page (say Page2), then user adds a SF by clicking the Add button, and again user check the checkbox in the second SF then this second SF should be inserted below the 1st SF in the subsequent page, and so on.....

Below is the link to the AEM file :

https://www.dropbox.com/s/tgn07t90dgeftgs/Sample%20AEm%20form.pdf?dl=0

 

Thanks Rui_Esteves

@radzmar   @Arun_Patidar   @BrianKasingli  @kautuk_sahni   @ChitraMadan  @betreff126  @Rui_Esteves 

 

1 Accepted Solution
Kiran_Vedantam
Correct answer by
Community Advisor
Community Advisor

Hi @rakeshk21205956,

 

You can try the below method for your use case:

  • Once the check box is clicked in SF1, using javascript, fetch the values
  • Once the new page (page2) is loaded, get the DOM element of SF2 and fill it with the details already filled in SF1
  • Now once the checkbox is clicked on SF2, get the DOM of SF1 and add a new div with the SF2 values, and so on..

 

Hope this helps.

 

Thanks,

Kiran Vedantam.

View solution in original post

0 Replies
Kiran_Vedantam
Correct answer by
Community Advisor
Community Advisor

Hi @rakeshk21205956,

 

You can try the below method for your use case:

  • Once the check box is clicked in SF1, using javascript, fetch the values
  • Once the new page (page2) is loaded, get the DOM element of SF2 and fill it with the details already filled in SF1
  • Now once the checkbox is clicked on SF2, get the DOM of SF1 and add a new div with the SF2 values, and so on..

 

Hope this helps.

 

Thanks,

Kiran Vedantam.

View solution in original post

rakeshk21205956
Level 3
Level 3

@Kiran_Vedantamthanks for the reply ... but i am a novice here, so request you to plz provide me a sample script. I have attached the file in the original Post.  @Rui_Esteves