Introduction to prepopulating adaptive form fields

nsvsrk 11-04-2016


Please refer to the following URL on Introduction to prepopulating adaptive form fields:

It discusses prepopulating Adaptive form using XFA form template, XML schema-based adaptive forms and Adaptive Form with no Form Model.

There are two zip files also offered.

Kindly explain how to test these three scenarios.



Accepted Solutions (1)

Accepted Solutions (1)

Community Manager


Sorry for delay response to this, 

Please have a look at the answer provided by internal team:-

  • For the first zip file:
  1. Download and unzip the zip file, The zip file contains a package, and xml files containing sample content.
  2. Import the package to AEM author instance using package share. The following forms are imported to AEM
  • Adaptive form with no form model
  • Adaptive form with XML Schema
  • Adaptive form with XFA
  • A repeatable sub form
  1. Navigate to AEM Forms manager, select a form and preview using the data provided in sample files. For example, to preview the adaptive form with no data model, the URL would be

http://localhost:4502/editor.html/content/forms/af/sampleAFWithNoFormModel.html?wcmmode=disabled&dat... path of data file]/AFWithNoDataModel.xml

  • For the second zip:

There seems to be an issue with the social connector package. The team is unable to login to Facebook using out of the box cloud connector. Team will update you about the second package in a day or two.  

I hope this would be of some help to you.

Thanks and Regards

Kautuk Sahni

Answers (3)

Answers (3)

nsvsrk 04-05-2016

Hi Kautuk,

Sorry for the delay in responding.

I have been away from system for a while and today only I got a chance to test it.

It works fine. 

Appreciate your help.



nsvsrk 22-04-2016


Thanks for reverting.

The URL talks about things involved in bits and pieces, but there no thread that ties all these together.

Could you please send me step by step procedure for achieving a form prefill with just two fields?



sixteenlabsinc 21-04-2016

Rama, in all cases the forms are still pre-populated the same way. Just the XML will change depending on which model you choose (xfa, schema, no model). Ideally you'll use a schema because if you move fields around in the adaptive form, you'll have the same issue that you had with Designer where the xml output will change based on the field location.

That said, one of the easiest ways to experiment with prepopulating is to create your form, then submit your form to your custom service and look at the structure of the XML submitted. Then, re-create that structure and populate the data node in your pre-fill.

In your post.POST.jsp, use  String formXML = request.getParameter("jcr:data"); to get the string value of the data submitted.

In your profill.jsp, use the reverse,  slingRequest.setAttribute("data", formdata); to populate the data of the form.