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

Form container Action Types

rsl_lucky
Level 4
Level 4

Hi All,

Want to understand the Form action types provided in core Form container component.  Actions Types of Mail & Store Content functionality have try them. Can anyone let me know functionalities in action types drop-down i.e. Submit & Update order. What those action types does and how to implement ?

rsl_lucky_0-1635494746814.png

 

Thanks in Advance.

1 Accepted Solution
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

Hi,

Please check following to know more about functioanity behind action type

https://github.com/adobe/aem-core-wcm-components/blob/master/content/src/content/jcr_root/apps/core/...

https://github.com/adobe/aem-core-wcm-components/blob/master/bundles/core/src/main/java/com/adobe/cq...

 

I think, it just add data attribute, you from front end you can handle the action based on type.

View solution in original post

5 Replies
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

Hi,

Please check following to know more about functioanity behind action type

https://github.com/adobe/aem-core-wcm-components/blob/master/content/src/content/jcr_root/apps/core/...

https://github.com/adobe/aem-core-wcm-components/blob/master/bundles/core/src/main/java/com/adobe/cq...

 

I think, it just add data attribute, you from front end you can handle the action based on type.

View solution in original post

Vijayalakshmi_S
Community Advisor
Community Advisor

Hi @rsl_lucky,

Submit order and Update order is related to commerce functionality, sample implementation/usage is available in we-retail site in Review Order page(/content/we-retail/us/en/user/checkout/order)and Checkout Page(/content/we-retail/us/en/user/checkout) respectively.

 

Respective action code is available in 

  • /libs/commerce/components/actions/submitorder
  • /libs/commerce/components/actions/updateorder
rsl_lucky
Level 4
Level 4

Thanks @Vijayalakshmi_S for the info shared, will check those.

Also can we customize, adding an option in drop-down to call a service that calls a third party service that returns response. Any samples around this would help ?

Vijayalakshmi_S
Community Advisor
Community Advisor

For creating custom action, we need to create a resource with sling:resourceType set as foundation/components/form/action (to be listed in the action types along with OOTB actions)

You can refer OOTB Store content(/libs/foundation/components/form/actions/store) implementation and copy the same to project specific folder and amend according to your use case.

Vijayalakshmi_S_0-1635782014005.png

  • cq:dialog has fields that comes up when you choose Store content in the action type. Same way, if you need to capture anything from the dialog with respect to your custom action, you can have those fields created here. 
  • post.POST.jsp has the actual logic of form action - In this case, calling third party service. 
  • clientlibs - logic for View data CTA as part of Store action (You can remove or retain based on your need)

Update this thread if you need any other specific inputs.

rsl_lucky
Level 4
Level 4

Hi Vijayalakshmi_S

Want to understand Store action type functionality existing in dialog of Form Container component. Is there any limit on no. of nodes to be stored or any space limitation of storing nodes on the path ?

My requirement to build a Form with core components available & to submit the information for different use-cases like to store form data onto external DB and to call any service to get response from it. Let me know your thought's across this.