Hello @varaande -
In AEM, the default content path for storing forms and documents is `/content/dam/formsanddocuments`. This path is used to organize and manage the assets related to forms and documents within AEM.
The reason for storing forms in the content path is to leverage AEM's content management capabilities. AEM provides features such as versioning, workflow, permissions, and asset management, which are beneficial for forms and documents. Storing forms as assets allows for easy authoring, management, and reuse across different sites and channels.
As for using Content Fragments for AEM Forms as a headless approach,
- it is technically possible but not a recommended approach. Content Fragments are designed for managing structured content and are primarily used for creating and managing content that needs to be shared across multiple channels or platforms. They are not specifically designed for handling forms and their associated functionality, such as form rendering, data capture, or form submission.
- AEM Forms, on the other hand, provides a comprehensive set of capabilities for designing, authoring, and managing forms. It includes features like form authoring, form templates, form data capture, validation, submission handling, and integration with back-end systems. These capabilities are specific to forms and are not available with Content Fragments alone.
- If you require a headless approach for forms in AEM, you can consider utilizing AEM's Content Services API, which provides a RESTful API for accessing AEM content and assets. You can use the API to retrieve form data and render forms in a headless manner while still leveraging the form capabilities provided by AEM Forms.
In summary, while Content Fragments can be used for managing structured content in a headless approach, it is not recommended to use them as a replacement for AEM Forms when you need the full range of form-related functionality. Instead, consider leveraging AEM's Content Services API to access and render AEM Forms in a headless manner.