To use a theme in an adaptive form

After you have created an adaptive form theme, perform the following steps to use this theme in an adaptive form:

  1. To include the theme created in to create an adaptive form theme section, create a custom page of type cq:Component.

    For example, /apps/myAfCustomizations/myAfPages/forestPage

    1. Add a sling:resourceSuperType property and set its value as fd/af/components/page/base.

      CRX repository snapshot

    2. To use a theme in the page, you must add an overriding file library.jsp to the node.

      You can then import the theme created in To create an adaptive form theme section of this article.

      The following sample code snippet imports the af.theme.forest theme.

      <%@include file="/libs/fd/af/components/guidesglobal.jsp"%>
      <cq:includeClientLib categories="af.theme.forest"/>
      
    3. Optional: In the custom page, override the header.jsp, footer.jsp, and the body.jsp, as required.

  2. Create a custom template (for example: /apps/myAfCustomizations/myAfTemplates/forestTemplate) whose the jcr:content points to custom page created in the previous step (for example: myAfCustomizations/myAfPages/forestPage).

    CRX repository snapshot

  3. Create an Adaptive form using the template created in the previous step. The look and feel of the adaptive form is defined by the theme created in the To create an adaptive form theme section of this article.

Experience Manager


Espressos & Experience Manager: AEM Forms

Espressos & Experience Manager

Thursday, Mar 6, 7:00 PM UTC

Join Adobe's AEM product team as they highlight AEM Forms' latest innovations, including: the new Gen AI Assistant, Unified Composition with AEM Sites, and new ways to deploy forms through conversations.

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more