Handling submitted XML data

When form data is submitted as XML, you can retrieve XML data that represents the submitted data. All form fields appear as nodes in an XML schema. The node values correspond to the values that the user filled in. Consider a loan form where each field in the form appears as a node within the XML data. The value of each node corresponds to the value that a user fills in. Assume a user fills the loan form with data shown in the following form.

hs_hs_loanformdata

The following illustration shows corresponding XML data that is retrieved by using the Forms service Client API.

hs_hs_loandata

The fields in the loan form. These values can be retrieved
using Java XML classes.

NOTE
The form design must be configured correctly in Designer for data to be submitted as XML data. To properly configure the form design to submit XML data, ensure that the Submit button that is located on the form design is set to submit XML data. For information about setting the Submit button to submit XML data, see AEM Forms Designer.

Handling submitted PDF data

Consider a web application that invokes the Forms service. After the Forms service renders an interactive PDF form to a client web browser, the user fills in the form and submits it back as PDF data. When the Forms service receives the PDF data, it can send the PDF data to another service or save it as a PDF file. The following diagram shows the application’s logic flow.

hs_hs_savingforms

The following table describes the steps in this diagram.

StepDescription
1A web page contains a link that accesses a Java Servlet that invokes the Forms service.
2The Forms service renders an interactive PDF form to the client web browser.
3The user fills in an interactive form and clicks a submit button. The form is submitted back to the Forms service as PDF data. This option is set in Designer.
4The Forms service saves the PDF data as a PDF file.