AEM 6.5 Forms XDP as HTML5 submit action "/content/xfaforms/profiles/default.submit.html" ==> error 404 | Community
Skip to main content
Level 4
May 26, 2020
Solved

AEM 6.5 Forms XDP as HTML5 submit action "/content/xfaforms/profiles/default.submit.html" ==> error 404

  • May 26, 2020
  • 4 replies
  • 12731 views

We have Author and publish instances of AEM 6.5.4, but did not install AEM JEE. 

 

We have previous in ES4 designed XDP forms with submit buttons that post either the PDF or XDP data to various services. 

 

In AEM, we generated the HTML5 version of the XDP and the submit will only call the servlet "/content/xfaforms/profiles/default.submit.html"

 

1. We tried to configure /content/xfaforms/profiles/... with our own profile and render the HTML5 file. We configure the submitURL, we select own submit button, all to no effect. It keeps invoking "/content/xfaforms/profiles/default.submit.html" which results in a 404. 

 

2. We created a new folder in "aem/forms.html/content/dam/formsanddocuments/" and uploaded the XDP as an asset to the folder. We then use the properties of the XDP in the advance tab configure the "HTML Render Profile" to point to our profile to use the pre-fill data in this profile. (Some static configuration data). This is working fine. In the same advance tab we configure the submit URL and again the system post to "/content/xfaforms/profiles/default.submit.html" which always provide us an error 404. (We check the chrome debug window and one the parameters it does send over to the server is a parameter "submitURL" with the actual URL we configure)

 

Questions:

1. How should be configure the HTML5 submit action such that is will be invoking the correct URL?

2. Alternative, do we need to develop our own "/content/xfaforms/profiles/default.submit.html" servlet/jsp page to handle the incoming data?

 

Is there any guide on this?

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 Mayank_Gandhi

@eric_stricker 

 

1. How should be configure the HTML5 submit action such that is will be invoking the correct URL?

 

2. Alternative, do we need to develop our own "/content/xfaforms/profiles/default.submit.html" servlet/jsp page to handle the incoming data?

 

To suggest, I first need to understand what your submit action does?

4 replies

Mayank_Gandhi
Adobe Employee
Mayank_GandhiAdobe EmployeeAccepted solution
Adobe Employee
May 26, 2020

@eric_stricker 

 

1. How should be configure the HTML5 submit action such that is will be invoking the correct URL?

 

2. Alternative, do we need to develop our own "/content/xfaforms/profiles/default.submit.html" servlet/jsp page to handle the incoming data?

 

To suggest, I first need to understand what your submit action does?

Level 4
May 26, 2020

@mayank_gandhi, thanks for the reply. The data we capture will be used in two ways.

 

1 We take the XDP and store the data into a database for further processing.

2. We take the data from the XDP re-merge is with the PDF template, generate a flat PDF and send this back the to customer email as a DOR. 

 

Hope this explains. 

 

 

Level 8
May 26, 2020

Hi

To store submitted data into DB you will have to do the following

Create a Servlet in AEM

This servlet will store the submitted data in the database

Configure the HTML5 forms submit action to call this servlet on form submission

The following links should help you

Custom submit handler to invoke HTML5 form submission

Sample code to store submitted data in data. The first 3 chapters in this multi-part tutorial should help you

Let me know if you need further clarifications. Will be more than happy to help you get going

 

Level 8
May 27, 2020

You can generate PDF with the data that was submitted from HTML5 form. 

To generate PDF you will have to write servlet and in that servlet you can merge the data with the xdp template and stream the pdf back to the user. You can also store the submitted data in the database in the same servlet

This article will help you in creating your own submit handler

https://docs.adobe.com/content/help/en/experience-manager-learn/forms/html5-forms/handle-mobile-form-submission.html

 

To trigger a workflow on html5 form submission, please follow this article

https://docs.adobe.com/content/help/en/experience-manager-learn/forms/offline-mobile-form-submission/introduction.html

 

Do let us know if you need any further help/clarifications. will be happy to assist you

 

 

Level 4
May 27, 2020

@girishbedekar 

Thank you for the reply. Not sure if this is still valid in AEM 6.5 as we do not have  AEM JEE running and the servlet is not working without this. In the end we did found that we could manual configure the "submitServiceProxy" value for the xfaforms\profiles. This will will then override the default servlet

 

The submitted data can then be transformed by our own servlet using LCFormsService to convert the JSON formDom to XML. Then we can invoke the submitURL and to do the task specific for that form.

As reference https://docs.adobe.com/content/help/en/experience-manager-65/forms/html5-forms/service-proxy.html