Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Creating Custom Action with Core Form Container

Avatar

Level 1


Tried below approach to create custom form action, this works for foundation form container but not for the core adaptive forms container component.

Writing a Custom Submit in AEM Forms | Adobe Experience Manager

 

After checking error log, there is a null pointer exception.

java.lang.NullPointerException: null
at com.adobe.aem.forms.af.rest.internal.servlets.AdaptiveFormSubmitServlet.doPost(AdaptiveFormSubmitServlet.java:253) [com.adobe.aem.com.adobe.aem.forms.af.rest:1.0.54]

 

Any pointers on how to support this with core adaptive form components?

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 1

This is resolved now. After debugging existing OOTB Submit action code, followed the same approach.

i.e.

1) Created Service implementing FormSubmitActionService

2) Override both methods getServiceName and submit.
3) Use the service name returned as part of getServiceName method in the node property submitService.

4) When form is submitted using custom action, submit method is invoked in which logic can be written.

View solution in original post

4 Replies

Avatar

Correct answer by
Level 1

This is resolved now. After debugging existing OOTB Submit action code, followed the same approach.

i.e.

1) Created Service implementing FormSubmitActionService

2) Override both methods getServiceName and submit.
3) Use the service name returned as part of getServiceName method in the node property submitService.

4) When form is submitted using custom action, submit method is invoked in which logic can be written.

Avatar

Level 5

Thanks for the update.

Could you let me know what AEM you have installed and the versions?

Avatar

Level 1

Adobe Experience Manager 2023.12.14697.20231215T125030Z-231200

Adobe Experience Manager Forms 2023.10.25.00-231200