AEM Forms allows form developers to seamlessly embed adaptive forms and interactive communications in an AEM Sites page or a web page hosted outside AEM. The embedded adaptive form and interactive communication is fully functional and users can fill and submit the form without leaving the page. It helps user remain in context of other elements on the web page and simultaneously interact with the form or interactive communication.
For information about embedding an adaptive form in an external web page, see Embed adaptive form in external web page.
In AEM Sites page, you can add an adaptive form or interactive communication using:
AEM Forms Container component
AEM Forms provides a component that you can add to your site pages. The AEM Forms Container component lets you embed an adaptive form and interactive communication.
All the forms and interactive communications you create are available under Assets. You can drag-drop the form as an asset on your page.
To embed an adaptive form or interactive communication in an AEM sites page that uses an editable template, ensure that the AEM Form component is configured as an allowed component in the associated template. For more information, see Policy & Properties (Layout Container) section in Creating Page Templates.
In case of a Sites page using a static template, you need to configure it in the paragraph system of the site page. See Configuring Components in Design Mode for more information.
To embed an adaptive form or interactive communication using AEM Forms Container component:
Open the AEM sites page, in edit mode, in which you want to embed an adaptive form or interactive communication.
From the Component browser panel, drag-drop the AEM Forms Container component on the page.
Alternatively, you can search for an adaptive form or interactive communication in the Assets browser and drag-drop it onto the Sites page. It embeds the form in an AEM Forms Container.
Multiple AEM Forms Container components on a page are not supported.
Tap the embedded AEM Forms Container component in the sites page, and then tap on the action bar. The Edit AEM Forms Container dialog opens.
In the Edit AEM Forms Container dialog, specify the following.
Asset Type: Select the type of asset to embed. The options are adaptive form and interactive communication
Asset Path: Browse and select the adaptive form or interactive communication to embed. It is auto-populated if you dropped it from the Assets browser.
(Adaptive form only) Post Submission: Select the action to trigger on form submission. You can choose to show a thank you message or a thank you page.
Theme: Select a theme that defines styling for components of your adaptive form or interactive communication. Styling includes appearance properties such as font style, background color, dimensions, and alignment.
Height: Specify the height of the container. Leave it blank to automatically resize the container.
CSS Client library: Specify path to a CSS client library.
Save the settings. The adaptive form or interactive communication is now embedded in the page.
Let’s consider the following scenarios for publishing an embedded asset (adaptive form or interactive communication) in AEM sites page:
AEM sites page maintains a reference to the adaptive form and interactive communication in the AEM Forms Container. Therefore, all configurations and properties, such as the theme, styles, and submit action, configured in the original adaptive form and interactive communication are retained in the embedded adaptive form and interactive communication.
To modify any configuration or property of the embedded adaptive form and interactive communication, do one of the following.
The changes made in the original adaptive form or interactive communication automatically reflect in the embedded form. However, republish the adaptive form, interactive communication, or the site page to reflect the changes in the published page.
Do keep the following points in mind when embedding adaptive forms in AEM sites pages: