Expand my Community achievements bar.

SOLVED

AEM component to create form field

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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/fo...

 

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

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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/fo...

 

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