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

custom Submit action for adaptive form result in failure to send mail.

Avatar

Avatar
Ignite 1
Level 2
kaushikd8293660
Level 2

Likes

7 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 3
Give Back
Boost 5
View profile

Avatar
Ignite 1
Level 2
kaushikd8293660
Level 2

Likes

7 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 3
Give Back
Boost 5
View profile
kaushikd8293660
Level 2

07-08-2020

Hi All,

I am new to AEM forms ,pardon me if my question is quite silly.
I am trying to create custom Submit action for adaptive forms following the article : 
https://docs.adobe.com/content/help/en/experience-manager-64/forms/customize-aem-forms/custom-submit...
But I am ending up with following error when trying to submit the form.
08.08.2020 00:40:13.931 *ERROR* [0:0:0:0:0:0:0:1 [1596827413533] POST /content/forms/af/amplify/Protocol1/jcr:content/guideContainer.af.submit.jsp HTTP/1.1] com.day.cq.wcm.core.impl.WCMDebugFilter Exception: org.apache.sling.scripting.jsp.jasper.JasperException: /apps/custom_submit_action1/store_and_mail/post.POST.jsp(10,65) Attempt to redefine the prefix sling to https://sling.apache.org/taglibs/sling/1.0, when it was already defined as http://sling.apache.org/taglibs/sling/1.0 in the current scope.
org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.jsp.jasper.JasperException: /apps/custom_submit_action1/store_and_mail/post.POST.jsp(10,65) Attempt to redefine the prefix sling to https://sling.apache.org/taglibs/sling/1.0, when it was already defined as http://sling.apache.org/taglibs/sling/1.0 in the current scope.

Will you please help what can be the reason to get such error. I am not able to send mail and submit data is not stored as well.
NOTE : When I am using OOTB submit action such as send mail , its working fine.

Thanks in Advance !


Regards,
Kaushik

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Level 2
Rakhi_Sukhadeve
Level 2

Likes

10 likes

Total Posts

13 posts

Correct Reply

5 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Give Back 5
Level 2
Rakhi_Sukhadeve
Level 2

Likes

10 likes

Total Posts

13 posts

Correct Reply

5 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile
Rakhi_Sukhadeve
Level 2

11-08-2020

kaushikd8293660 I have tested the same at my end and it works after replacing the below 2 lines in post.POST.jsp

<%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0" %>
<%@taglib prefix="cq" uri="http://www.day.com/taglibs/cq/1.0" %>

 I hope this is helpful.

Answers (3)

Answers (3)

Avatar

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

163 likes

Total Posts

233 posts

Correct Reply

36 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

163 likes

Total Posts

233 posts

Correct Reply

36 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
GirishBedekar
Level 7

08-08-2020

https://docs.adobe.com/content/help/en/experience-manager-learn/forms/adaptive-forms/custom-submit-a...


Follow this document for creating the custom submit

In the post.jsp you can write a simple system.out.println statement to see if that is working 

after that you can write your code in the post.jsp

Avatar

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

163 likes

Total Posts

233 posts

Correct Reply

36 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

163 likes

Total Posts

233 posts

Correct Reply

36 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
GirishBedekar
Level 7

07-08-2020

Avatar

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

163 likes

Total Posts

233 posts

Correct Reply

36 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

163 likes

Total Posts

233 posts

Correct Reply

36 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
GirishBedekar
Level 7

07-08-2020

Please use the send email component in your workflow 

configure form to submit to that workflow