Prerequisites

When you create an adaptive form using the AEM Forms user interface, AEM creates the structure of the form's content under the node /content/forms/af.

Therefore, the structure of the URL to render the form starts with http://[host]:[port]/content/forms/af/.

This arrangement works in most cases. However, if you use AEM sites, you want the form URL to align with the URL structure of your website.

For example, if the URL structure of your website is http://[host]:[port]/content/geometrixx-media, you want the form URL to include a child path. For example, the URL to your form can have the structure http://[host]:[port]/content/geometrixx-media/en/sampleform.html.

Perform the following steps to align the form URL with your website URL:

Using adaptive forms in AEM sites

  1. Create a new adaptive form template by performing the steps mentioned in Creating an Adaptive Form Template. Change its allowedPaths property to enable the template to be listed under the gemoetrixx-media site.

  2. On your AEM server, navigate to any folder under Sites > Geometrixx Media, and click Create Page. The template you created is included in the list of available templates.

    A list of available adaptive form templates
  3. Select this template and create a page.

  4. Open the page. If the adaptive form is not rendered properly, replace the string editor.html in the URL with cf# to enforce classical authoring.

    Screenshot depicting "editor.html" in the URL being replaced with cf#
  5. If necessary, edit the Adaptive Form Container component dialog settings in the authoring mode and select the option to use an existing adaptive form.

  6. In the Adaptive Form Path dialog, click Browse. The dialog prompts you to select the adaptive form asset.

  7. Select the adaptive form asset (under /content/dam/formsanddocuments) from the path browser. The adaptive form is rendered as a reference asset when you render the parent page. You cannot author an adaptive form asset that is rendered.

    Rendered adaptive form asset

Note:

You cannot edit the referenced adaptive form from the AEM site page. To edit the form, go to the AEM Forms UI and open the original adaptive form in authoring mode. Any modification is automatically reflected in the page that references the form.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy