How to get the form data

Avatar

Avatar

Jing_Luo

Avatar

Jing_Luo

Jing_Luo

15-10-2015

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

View Entire Topic

Avatar

Avatar

Jing_Luo

Avatar

Jing_Luo

Jing_Luo

15-10-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.