Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Creating Custom Action Type in Form Component AEM 6.1

Avatar

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

Avatar

Correct answer by
Level 10

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

8 Replies

Avatar

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.

Avatar

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. 

Avatar

Correct answer by
Level 10

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

Avatar

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.

Avatar

Level 10

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.

Avatar

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.

Avatar

Level 10

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.