Core Form Container Submit -Post Form Data | Community
Skip to main content
Level 5
May 18, 2022
Solved

Core Form Container Submit -Post Form Data

  • May 18, 2022
  • 2 replies
  • 1794 views

Hi Team,

 

AEM Version: 6.5.11

 

Core component version: 2.17.12

 

We are building a simple form using Form Container and core components like Form Text, Form Submit etc.

 

 

Within Form Container we put Form Text, Form button as Submit.

 

Problem Statement: Now when we click on submit button, It does not post/call that  API url. No call in network tab.

 

 

Question: How does it work? Some configuration is needed ?

or this is just dialog support and rest all JS/server side code to be written manually?

 

 

 

 

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 lukasz-m

Hi @arvind-1,

This is correct behavior. You will not see direct request to external API. In general this is how the request flow looks like OOTB for Post form data option and external endpoint.

  1. Form submit is handled by FormActionRpcServlet
  2. FormActionRcpServlet transforms data from form into JSON format and pass it to FormHandlerImpl service.
  3. FromHandlerImpl service uses Apache Http Client to send the data (in JSON format) to endpoint configured in Core From Container component.

Communication with endpoint happens behind the scene in backend (this is why you are not seeing call to API url in network tab in browser). OOTB form container is not supporting ajax calls - so every time you submit form page will be reloaded.

Please explore/debug, below classes to get full understanding or in case of troubleshooting:

2 replies

arunpatidar
Community Advisor
Community Advisor
May 18, 2022
lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
May 18, 2022

Hi @arvind-1,

This is correct behavior. You will not see direct request to external API. In general this is how the request flow looks like OOTB for Post form data option and external endpoint.

  1. Form submit is handled by FormActionRpcServlet
  2. FormActionRcpServlet transforms data from form into JSON format and pass it to FormHandlerImpl service.
  3. FromHandlerImpl service uses Apache Http Client to send the data (in JSON format) to endpoint configured in Core From Container component.

Communication with endpoint happens behind the scene in backend (this is why you are not seeing call to API url in network tab in browser). OOTB form container is not supporting ajax calls - so every time you submit form page will be reloaded.

Please explore/debug, below classes to get full understanding or in case of troubleshooting: