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

Creating Custom Action Type in Form Component AEM 6.1

haroldm43863165
Level 2
Level 2

I am trying to do a custom action type for my component form, I have been following the tutorial based on the documents : https://docs.adobe.com/docs/en/aem/6-1/develop/components/developing-forms.html but to no luck every time I submit the form the post.POST.jsp is not being called. I tried to use the sling servlet based on the question i found on Stackoverflow: http://stackoverflow.com/questions/22344470/how-do-i-configure-built-in-form-component-in-cq-5 but still no luck happened. Is there something I might missed out?

 

Thanks

1 Accepted Solution
Lokesh_Shivalingaiah
Correct answer by
Community Advisor
Community Advisor

Check the OOB implementation on the same here /libs/foundation/components/form/actions

and hope that helps you to understand and verify your implementation along the same lines

View solution in original post

0 Replies
haroldm43863165
Level 2
Level 2
        Thank you for the response but right now the forms that we are using is not the adaptive forms but the form component.
smacdonald2008
Level 10
Level 10

For Forms (not adpative forms) - try using AJAX to post data to a custom sling servlet - that way - you are getting the form data to backend Java. 

Lokesh_Shivalingaiah
Correct answer by
Community Advisor
Community Advisor

Check the OOB implementation on the same here /libs/foundation/components/form/actions

and hope that helps you to understand and verify your implementation along the same lines

haroldm43863165
Level 2
Level 2

Thank you for the response, I checked the OOB implementation from libs/foundation/components/form/actions and I even tried to copy and paste the post.POST.jsp on my custom form action node, but the post.POST.jsp is not being called during the submission of the form component.

Amit_Kumar
Community Advisor
Community Advisor

harold malabanan wrote...

Thank you for the response, I checked the OOB implementation from libs/foundation/components/form/actions and I even tried to copy and paste the post.POST.jsp on my custom form action node, but the post.POST.jsp is not being called during the submission of the form component.

 

You can't just copy and paste this jsp you have to edit the logic a bit to suit you custom form action.

haroldm43863165
Level 2
Level 2

Yes, I am aware that I have to edit the logic for the my custom form action but right now I still don't know why does the POST.jsp file is not being used during the form submission? As per this link that in order to create the custom action type a node has to be created and inside that node there should be a post.POST.jsp. I followed the instructions given and my customFormAction is available on the form component (Please see the image)

but the form is not being passed to the post.POST.jsp.

Ratna_Kumar
Community Advisor
Community Advisor

Hi,

See this community article which has released today. It will help your use case.

//http://scottsdigitalcommunity.blogspot.ca/2017/04/creating-custom-action-for-adobe.html

~ Ratna.