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

Eric_Stricker

25-05-2020

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?

Accepted Solutions (1)

Accepted Solutions (1)

Mayank_Gandhi

Employee

26-05-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?

Answers (3)

Answers (3)

GirishBedekar

26-05-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...

 

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

 

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

 

 

GirishBedekar

26-05-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