Step 1: Create the adaptive form

  1. Log in to the AEM author instance and navigate to Adobe Experience Manager > Forms > Forms & Documents. The default URL is http://localhost:4502/aem/forms.html/content/dam/formsanddocuments.

  2. Select Create and select Adaptive Form. An option to select a template appears. Select the Blank template to select it and select Next.

  3. An option to Add Properties appears. The Title and Name fields are mandatory:

    • Title: Specify Add new or update shipping address in the Title field. The title field specifies the display name of the form. The title helps you identify the form in the AEM Forms user interface.
    • Name: Specify shipping-address-add-update-form in the Name field. The Name field specifies the name of the form. A node with the specified name is created in the repository. As you start typing a title, value for the name field is automatically generated. You can change the suggested value. The name field can include only alphanumeric characters, hyphens, and underscores. All the invalid inputs are replaced with a hyphen.
  4. Select Create. An adaptive form is created and a dialog to open the form for editing appears. Select Open to open the newly created form in a new tab. The form opens for editing. It also displays the sidebar to customize the newly created form according to the needs.

    For information about adaptive form authoring interface and available components, see Introduction to authoring adaptive forms.

    A newly created adaptive form.

AEM Forms provides many components to display information on an adaptive form. Header and Footer components help provide a consistent look and feel to a form. A header typically includes the logo of a corporation, the title of the form, and summary. A footer typically includes copyright information and links to other pages.

  1. Select toggle-side-panel > treeexpandall . The component browser opens. Drag the Header component from component browser to the adaptive form.

  2. Select Logo. The toolbar appears. Select aem_6_3_edit on the toolbar, type We.Retail, and select aem_6_3_forms_save .

  3. Select Image. The toolbar appears. Select cmppr . The properties browser opens on the left of the screen. Browse and upload the logo image. Select aem_6_3_forms_save . The image appears on the header.

    You can select Get file to download the logo used in this article if you do not have one.

    Get File

  4. Drag the Footer component from treeexpandall to the adaptive form. At this stage, the form looks like the following:

    adaptive-form-with-headers-and-footers

Step 3: Add components to capture and display information

Components are building blocks of an adaptive form. AEM Forms provides many components to capture and display information in an adaptive form. You can drag the components from treeexpandall to a form. To learn about available components and corresponding functionality, see Introduction to authoring adaptive forms.

  1. Drag the Numeric Box component to the adaptive form. Place it before the footer component. Open properties of the component, change Title of the component to Customer ID, change Element Name to customer_ID, enable the Required Field option, enable the Use HTML5 Number Input Type option, and select aem_6_3_forms_save .

  2. Drag three Text Box components to the adaptive form. Place these before the footer component. Set the following properties for these text boxes.:

    PropertyText Box 1Text Box 2Text Box 3
    TitleNameShipping AddressState
    Element Namecustomer_Namecustomer_Shipping_Addresscustomer_State
    Required FieldEnabledEnabledEnabled
    Allow multiple linesDisabledEnabledDisabled
  3. Drag a Numeric Box component before the footer component. Open properties of the component, set values listed in the below table, Select aem_6_3_forms_save .

    PropertyValue
    TitleZIP Code
    Element Namecustomer_ZIPCode
    Maximum Number of Digits6
    Required FieldEnabled
    Display Pattern TypeNo Pattern
  4. Drag an Email component before the footer component. Open properties of the component, set values listed in the below table, and select aem_6_3_forms_save .

    PropertyValue
    TitleEmail
    Element Namecustomer_Email
    Required FieldEnabled
  5. Drag an File Attachment component before the footer component. Open properties of the component, set values listed in the below table, and select aem_6_3_forms_save .

    PropertyValue
    TitleGovernment approved address proof
    Element Namecustomer_Address_Proof
    Required FieldEnabled
  6. Drag a Submit Button component to the adaptive form. Place it before the footer component. Open properties of the component, change Element Name to address_addition_update_submit, select aem_6_3_forms_save . The layout of the form is complete and the form looks like the following:

    adaptive-form-with-all-the-components

Step 4: Configure submit action for the adaptive form

A submit action is triggered when a user taps the Submit button on an adaptive form. You can use a submit action to save form data to the local repository, send form data to a REST endpoint, send form data as an email, and more. Adaptive forms provides a few more out-of-the-box submit actions. For detailed information, see Configuring the Submit action.

Using the following steps, you can configure email submit action and demo submit action of the form:

  1. Configure the email server. For details, see Configuring Email Notification.

  2. Select Form Container in the Content browser and select cmppr . The properties browser opens on the left.

  3. Go to Submission > Submit Action. Select Send Email. Specify the following values and select aem_6_3_forms_save .

    PropertyValue
    Fromdonotreply@weretail.com
    To${customer_Email}
    SubjectAcknowledgement: You have added shipping address on We.Retail website.
    Email TemplateHi ${customer_Name}, The following address is added as the shipping address for your account:
    ${customer_Name}, ${customer_Shipping_Address}, ${customer_State}, ${customer_ZIPCode}
    Regards, We.Retail
    Include attachmentsEnabled

    Your form is ready. Now, you can preview the form and test the functionality. If you have used the name mentioned the tutorial and accessing the form on the machine running AEM Forms server, then the form is available at http://localhost:4502/editor.html/content/forms/af/shipping-address-add-update-form.html.

Step 5: Preview and submit the adaptive form

You can use the Preview option to evaluate appearance and behavior of a form. You can submit a form in preview mode and also check validations applied on a form. For example, if an error is displayed when a mandatory field is left empty.

Adaptive forms also provide an option to Emulate experience of a form for various devices. For example, iPhone, iPad, and Desktop. You can use both Preview and Emulator ruler options in conjunction with each other to preview a form for devices of different screen sizes.

  1. Select the Preview option on the right side of the form editor. The form opens in the preview mode. If you have used the name mentioned the tutorial, then preview URL of the form is http://localhost:4502/content/dam/formsanddocuments/shipping-address-add-update-form/jcr:content?wcmmode=disabled
  2. Use ruler to view how the form looks on various devices.
  3. Fill out fields of the form and select Submit. The form is submitted and you are redirected to default Thank You page. You can also specify a custom thank you page. For details, see Configuring redirect page.

The adaptive form to add an address is ready. If you have used the name mentioned in the tutorial and accessing the form on the machine running AEM Forms server, then the form is available at http://localhost:4502/editor.html/content/forms/af/shipping-address-add-update-form.html.

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

Elevate and Empower Teams with Agentic AI for Exceptional Experiences

Online | Strategy Keynote | General Audience

Elevate and empower your CX teams with AI that transforms creativity, personalization, and productivity. Discover how Adobe is...

Tue, Mar 18, 1:00 PM PDT (8:00 PM UTC)

Register

Driving Marketing Agility and Scale: Transforming your Content Supply Chain with AI

Online | Strategy Keynote | General Audience

Marketers everywhere are feeling the pressure to deliver impactful campaigns faster and at greater scale. This Strategy Keynote explores...

Tue, Mar 18, 2:30 PM PDT (9:30 PM UTC)

Register

Connect with Experience League at Summit!

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

Learn more