Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Copy same detail in the subsequent pages

Avatar

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   @arunpatidar   @BrianKasingli  @kautuk_sahni   @ChitraMadan  @betreff126  @Rui_Esteves 

 

1 Accepted Solution

Avatar

Correct answer by
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

3 Replies

Avatar

Correct answer by
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.

@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