How to get the form data | Community
Skip to main content
October 16, 2015
Solved

How to get the form data

  • October 16, 2015
  • 2 replies
  • 1335 views

I am working on an adaptive form. I upload a Test.xdp file. Then use the template as areference to synchronize with the adaptive form.

I have three step in the form.

[img]qq.png[/img]

  1. Step 1, adaptive form. I drag the form elements into the  Adaptive Form Page.
  2. Step 2, verifyfilldata.
  3. Step 3, send an email to a process. The email include an Test.xml attachment.  There is a button to submit the form .

I have created a custom submit action for my form .

Now my problem is how to get the form data in the post.POST.jsp .

There are 2 problems I need to fix.

  1. I tried use String First = request.getParameter("First"); to get thie First name field value, it doesn't work,because the submit button in the Step 3 panel,I made the button in the Step 1, it works.
  2. But I only can get the data who is not have the Bind reference.

Can someone help me

Thanks advance

Jing

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 smacdonald2008

Another way to get data posted from an Adaptive form is to post data to an OSGi service. Then you can use Java logic to process the data to meet your business requirements. See this article: 

Posting AEM 6 Form Data to Custom Services

2 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

Another way to get data posted from an Adaptive form is to post data to an OSGi service. Then you can use Java logic to process the data to meet your business requirements. See this article: 

Posting AEM 6 Form Data to Custom Services

October 16, 2015

Hi, I have got the solution for this question.

Document dataXml = null;
    if(slingRequest.getParameter("jcr:data")!=null) {
        dataXml = new Document(slingRequest.getRequestParameter("jcr:data").get());
     }

The "dataXml " is the data of the form.