Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

need help on submit action when rendering the form as HTML

adeivasigamani
Level 4
Level 4

When FORM is rendered as HTML, the submit button does not work,

The following are the steps that I performed in my existing XDP form.

1) Added a button object to the XFA form dom

2) Gave the following properties to the Submit button in the object pallet

     a) Selected the Contron Type as Execute

     b) Gave a REST end point in the Button property

     c) Selected XDP data package as the submit type

     d) selected UTF-8 as the data encoding type

3) I rendered the form in the browser (not in the workspace container) but by directly applying the XFAFORMS profile with the url http://localhost:8080/lc/content/xfaforms/profile/default/html?contentRoot=repositor///path to the XDP file&template=FileName

4) When clicking on the submit button on the form, the following error is thrown, please let me know where I am going wrong in the approach to invoke a REST call to the process endpoint

"Error 500: DSCError: ComponentID= DSC ErrorCode= 122 MinorCode= 0 Message= Input parameter: {2} not found on operation: {0}.{1} ErrorMessage: Input parameter: {2} not found on operation: {0}.{1}"

Regards -

Ashok D

1 Accepted Solution
adeivasigamani
Correct answer by
Level 4
Level 4

Guys, the reason that I was not able to submit my form to the process endpoint was because I had designed the process to take an xml as input by the variable name formData, and it seems the REST invocation from the HTML form sends the data as a map of string.

I changed my process to take a map as the input parameter as input instead of XML and retrieved the form data in the map in the process.

Steps involved

1) create a process with a variable of type map of strings as input

2) create your form and include the http submit button and provide the REST endpoint url as input to the submit button or include a simple button and select the category as submit and provide the needed inputs in the submit tab.

3) in the process use a execute event and get the value of the input data as a string with the following expression

map[@data]

4) Convert the string into XML and use in your process further.

Regards -

Ashok D

View solution in original post

3 Replies
adeivasigamani
Correct answer by
Level 4
Level 4

Guys, the reason that I was not able to submit my form to the process endpoint was because I had designed the process to take an xml as input by the variable name formData, and it seems the REST invocation from the HTML form sends the data as a map of string.

I changed my process to take a map as the input parameter as input instead of XML and retrieved the form data in the map in the process.

Steps involved

1) create a process with a variable of type map of strings as input

2) create your form and include the http submit button and provide the REST endpoint url as input to the submit button or include a simple button and select the category as submit and provide the needed inputs in the submit tab.

3) in the process use a execute event and get the value of the input data as a string with the following expression

map[@data]

4) Convert the string into XML and use in your process further.

Regards -

Ashok D

View solution in original post

WilliamClement
Level 1
Level 1

This is also true when submitting HTML5 Form Sets to an endpoint in AEM Forms 6.1.

You my friend, have saved me a few hours!

Cheers,

Guillaume (William) Clement

tarekahf
Level 8
Level 8

Could you please check this:

Submit HTML5 Form to LiveCycle Server

Do you think your approach will solve my problem too! I appreciate your feedback.

In the mean time, I'll try to follow your approach.

Tarek