AEM component to create form field | Community
Skip to main content
Level 2
June 14, 2022
Solved

AEM component to create form field

  • June 14, 2022
  • 1 reply
  • 770 views

Hi Team

 

I am working on a project where I need to create a dropdown, checkbox, date range fields and respective labels and one submit button. As I don't have AEM forms package and my project team only works on sites. I have created a component and in component html I have used html code to create form fields and my UI looks as per the requirement.

 

Will there be any problem if I make use of these fields like taking input from the above fields and call an API.

 

I am stuck with calling an api post action with parameters within the component html.

 

Please provide your feedback and inputs on this requirement.

 

Thanks and Regards

Prashanthi

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 Anmol_Bhardwaj

Hi @prash0905 ,

 

Form Container component would be a good place to start with something like this. And then there are other OOTB components which you can place inside Form Container .

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/components/forms/form-container.html?lang=en

 

Form action can be modified to call a custom servlet after submission of the form.

You can see a demo for how the UI & fuctionality would be for the OOTB component here:

https://www.aemcomponents.dev/content/core-components-examples/library/core-form/form-text.html

 

 

1 reply

Anmol_Bhardwaj
Community Advisor
Anmol_BhardwajCommunity AdvisorAccepted solution
Community Advisor
June 14, 2022

Hi @prash0905 ,

 

Form Container component would be a good place to start with something like this. And then there are other OOTB components which you can place inside Form Container .

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/components/forms/form-container.html?lang=en

 

Form action can be modified to call a custom servlet after submission of the form.

You can see a demo for how the UI & fuctionality would be for the OOTB component here:

https://www.aemcomponents.dev/content/core-components-examples/library/core-form/form-text.html