Sample Prefill XML structure

<?xml version="1.0" encoding="UTF-8"?>
<afData>
  <afBoundData>
     <employeeData>
        .
     </employeeData>
  </afBoundData>

  <afUnboundData>
    <data>
      <textbox>Hello World</textbox>
         .
         .
      <numericbox>12</numericbox>
         .
         .
    </data>
  </afUnboundData>
</afData>

Sample Prefill JSON structure

{
   "afBoundData": {
      "employeeData": { }
   },
   "afUnboundData": {
      "data": {
         "textbox": "Hello World",
         "numericbox": "12"
      }
   }
}

For bound fields with same bindref or unbound fields with same name, data specified in the XML tag or JSON object is filled in all the fields. For example, two fields in a form are mapped to the name textbox in the prefill data. During runtime, if the first text box field contains “A”, then “A” is automatically filled in the second text box. This linking is called live linking of adaptive form fields.

Adaptive form using XFA form template

The structure of prefill XML and the submitted XML for XFA-based adaptive forms is as follows:

  • Prefill XML Structure: The prefill XML for XFA-based adaptive form must be compliant with the data schema of the XFA form template. To prefill unbound fields, wrap the prefill XML structure into /afData/afBoundData tag.

  • Submitted XML Structure: When no prefill XML is used, the submitted XML contains data for both bound and unbound fields in afData wrapper tag. If a prefill XML is used, the submitted XML has the same structure as the prefill XML. If the prefill XML starts with the afData root tag, the output XML also has the same format. If the prefill XML does not have afData/afBoundDatawrapper and instead starts directly from the schema root tag like employeeData, the submitted XML also starts with the employeeData tag.

Prefill-Submit-Data-ContentPackage.zip

Get File
Sample containing prefill data and submitted data