Pre Populate an Adaptive form | Community
Skip to main content
famruch
October 16, 2015
Solved

Pre Populate an Adaptive form

  • October 16, 2015
  • 3 replies
  • 2281 views

Hi Guys,

Does anyone know how to pre populate an AEM adaptive form using XML or any other data format from a web service? A link to an example will be sufficient.

Thanks,

Afam

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by deepak_k_

If your rest API directly return the XML and is open for to public access, article already mentions the detail about how to use that:

http://localhost:4502/content/forms/af/xml.html?wcmmode=disabled&dataRef=http://localhost:8000/somesamplexmlfile.xml

If the data XML url is not accessible anonymously, you can write your own code, fetch the data in in you jsp or java code and set that in request attribute which would be used for prefill. The above article mentions how to prefill from request attribute and has a sample.

 

Or is it that you want to prefill part of the form based on some user gesture like lookup address based on zip code?

3 replies

Adobe Employee
October 16, 2015

Hi Afam,

See if the following article helps:

http://helpx.adobe.com/aem-forms/6/prepopulate-adaptive-form-fields.html

 

Regards,

Vishal

famruch
famruchAuthor
October 16, 2015

Hi Vishal,

Thanks for the article. It was helpful.

Would have liked a bit more detail in the example especially around how to invoke the rest API to pre populate the form.

Cheers,

Afam

deepak_k_Adobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

If your rest API directly return the XML and is open for to public access, article already mentions the detail about how to use that:

http://localhost:4502/content/forms/af/xml.html?wcmmode=disabled&dataRef=http://localhost:8000/somesamplexmlfile.xml

If the data XML url is not accessible anonymously, you can write your own code, fetch the data in in you jsp or java code and set that in request attribute which would be used for prefill. The above article mentions how to prefill from request attribute and has a sample.

 

Or is it that you want to prefill part of the form based on some user gesture like lookup address based on zip code?