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
BedrockMission!

Learn More

View all

Sign in to view all badges

Unable to read the response back when using submit action in AEM forms

Avatar

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
rohitn62196663
Level 3

02-05-2018

I am trying to submit the entire form data using the submit action in AEM forms. I have my own custom submit action which is built on top of the OOTB "sumit to REST endpoint" action. So I am able to hit the end point which I configured within the submit action but I am unable to read the response back to UI. I dont want to redirect it to another thank you page. My app is a single page application so I just want to write the response back to UI so that I can read the response. I have gone through the adobe docs and my code is below:

guideBridge.registerConfig("submitConfig", {"useAjax" : true});

guideBridge.submit({

  validate: false,

  error : function (guideResultObject) {console.log("error occured");},

  success : function (guideResultObject) {console.log("success occured");

}

});

But I am unable to read the response the end point is writing back to my custom action. All I see in the "guideResultObject" is

"{"thankYouOption":"page","thankYouContent":"<currentpageUrl>/jcr:content/guideContainer.guideThankYouPage.html?owner=admin&status=Submitted"}", status: "Submitted"}

I think there are some internal GuideSubmitServlet scripts which are intercepting the request and adding these params to the response. Is there a way to stop this and send the my custom response back to UI ?

Thanks in advance.

Accepted Solutions (0)

Answers (5)

Answers (5)

Avatar

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
rohitn62196663
Level 3

03-05-2018

Any update from the forms team please ?

Avatar

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

279 likes

Total Posts

1,105 posts

Correct Reply

181 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

279 likes

Total Posts

1,105 posts

Correct Reply

181 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile
Mayank_Gandhi
Level 10

02-05-2018

Please refer below forum discussion where a similar query was discussed.

"status" and "owner" parameters are not required in form action

Avatar

Avatar
Validate 1
Level 2
akhilat9657589
Level 2

Likes

6 likes

Total Posts

29 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
akhilat9657589
Level 2

Likes

6 likes

Total Posts

29 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
akhilat9657589
Level 2

24-10-2018

Hi Rohit,

Were you able to fix this?

Thanks,

Akhila

Avatar

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
rohitn62196663
Level 3

02-05-2018

yup I see that code snippet in the OOTB action too. However even after that it didn't remove the params. And also I am not sure from where this TYoption and TYpagecontent is coming in the params.

I am trying to see if there are any methods in GuideUtils class which would help me with this.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

02-05-2018

Checking with the Form team to see if we have any example of this use case. We have use cases on custom actions and handling form data in an OSGi bundle - but not writing out the submitted form back on the original form.