Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Pre-populate a form with another form's data

Avatar

Level 2

I've got a curly question, i'm not sure if this is possible, but here goes...

I want to create a link within an abobe form that opens another adobe form. Easy enough, but i want to populate fields in the second form from information entered in the first.

Is this possible?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

It is tricky, but it can be done.

The first form (https://acrobat.com/#d=SxYdTHsdYH90mPljsB4y7g) has a hidden field that harvests the data in two fields and puts them in a dataset called myData. Using app.media it 'broadcasts' the dataset.

The second form (https://acrobat.com/#d=771uNAYn9GRLlTgiaHNwfA) then 'listens' for the dataset and if the dataset exists it will populate the corresponding fields in the second form with data from the first.

The second form has the script in the initialise event, so it will only fire on opening the form. There isn't a live link between the two forms, so that changes in form1 are not continuously reflected/updated in form2. It only happens when form2 is opened.

You would need to set up the dataset for all of the fields that you want to share. If there are a lot of them then it can be tedious.

The full LC Enterprise Suite would probably automate this, but this is a workaround for LC Designer.

Hope that helps,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

It is tricky, but it can be done.

The first form (https://acrobat.com/#d=SxYdTHsdYH90mPljsB4y7g) has a hidden field that harvests the data in two fields and puts them in a dataset called myData. Using app.media it 'broadcasts' the dataset.

The second form (https://acrobat.com/#d=771uNAYn9GRLlTgiaHNwfA) then 'listens' for the dataset and if the dataset exists it will populate the corresponding fields in the second form with data from the first.

The second form has the script in the initialise event, so it will only fire on opening the form. There isn't a live link between the two forms, so that changes in form1 are not continuously reflected/updated in form2. It only happens when form2 is opened.

You would need to set up the dataset for all of the fields that you want to share. If there are a lot of them then it can be tedious.

The full LC Enterprise Suite would probably automate this, but this is a workaround for LC Designer.

Hope that helps,

Niall

Avatar

Level 2

Thanks very much. That's exactly what i needed!

Rob