Creating Custom Action Type in Form Component AEM 6.1 | Community
Skip to main content
Level 2
February 22, 2016
Solved

Creating Custom Action Type in Form Component AEM 6.1

  • February 22, 2016
  • 8 replies
  • 3207 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Lokesh_Shivalingaiah

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

8 replies

smacdonald2008
Level 10
February 22, 2016

See this community article - it works: 

https://helpx.adobe.com/experience-manager/using/posting-aem-6-form-data.html

Hope this helps. 

Level 2
February 22, 2016
        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
February 22, 2016

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
Lokesh_ShivalingaiahAccepted solution
Level 10
February 22, 2016

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

Level 2
February 22, 2016

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
Level 10
February 22, 2016

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.

Level 2
February 23, 2016

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
Level 10
April 10, 2017

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.