How to write forms component using React? | Community
Skip to main content

2 replies

Avinash_Gupta_
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
December 16, 2022

Hi @davidzhang 

 

Would you please provide more details about the use case you want to implement. Refer to the following link if your ask was only to create a form in React.js 

 

https://reactjs.org/docs/forms.html 

 

Level 4
December 16, 2022

I mean how to use React in AEM Forms addon. I didn't see any example on how to integrate AEM forms component to React.

Avinash_Gupta_
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
December 17, 2022

Hi @davidzhang 

 

For implementing it for the AEM forms also, it would follow the similar approach to create React SPA component in AEM. You only have to assign it under the similar component group name as "Adaptive Form"  so that this component would be listed to drag drop on the forms. 

 

 

 

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/spa-editor/react/overview.html?lang=en 

 

Hope this helps.

Mayank_Gandhi
Adobe Employee
Adobe Employee
December 19, 2022

@davidzhang form has not been tested with react components unlike AEM which has SPA support. There is something in pipe line to bring it closer to aem core component on Cloud, are you using on prem?

Level 4
December 19, 2022

Yes, we are using AEM 6.5 in prem.

 

Mayank_Gandhi
Adobe Employee
Adobe Employee
December 19, 2022

@davidzhang FDM is form data model that allows you to connect forms for R/W operation with the backend system and API without writing code.

 

https://experienceleague.adobe.com/docs/experience-manager-65/forms/form-data-model/work-with-form-data-model.html?lang=en