Prerequisite

  • Set up an AEM author instance

  • Install AEM Forms add-on on author instance.

  • Obtain JDBC database driver (JAR file) from database provider. Examples in the tutorial are based on MySQL database and use Oracle’s MySQL JDBC database driver.

  • Set up a database containing customer data with the fields displayed below. A database is not essential to create an adaptive form. This tutorial uses a database to display form data model and persistence capabilities of AEM Forms.

adaptiveformdata

Step 1: Create an adaptive form

03-create-adaptive-form-main-image_small

Adaptive forms are new generation, engaging, responsive, dynamic, and adaptive in nature. Using adaptive forms, you can deliver personalized and targeted experiences. AEM Forms provide a drag-and-drop WYSIWYG editor to create adaptive forms. For more information about adaptive forms, see Introduction to authoring adaptive forms.

Goals:

  • Create an adaptive form that allows a customer to add a shipping address.
  • Layout fields of an adaptive form to display and accept information from a customer.
  • Create submit action to send an email containing form content.
  • Preview and submit an adaptive form.

See the Guide

Step 2: Create Form Data Model

05-create-form-data-model-main_small

A form data model lets you connect an adaptive form to disparate data sources. For example, AEM user profile, RESTful web services, SOAP-based web services, OData services, and relational databases. A Form data model is a unified data representation schema of business entities and services available in connected data sources. You can use the form data model with an adaptive form to retrieve, update, delete, and add data to connected data sources.

Goals:

  • Configure the website’s database instance (MySQL database) as a data source.
  • Create the form data model using MySQL database as a data source.
  • Add data model objects so you can form the data model.
  • Configure read and write services for the form data model.
  • Test form data model and configured services with test data.

Step 3: Apply rules to adaptive form fields

07-apply-rules-to-adaptive-form_small

Adaptive forms provide an editor to write rules on adaptive form objects. These rules define actions to trigger on form objects based on preset conditions, user inputs, and user actions on the form. It helps ensure accuracy and speeds up the form-filling experience.

Goals:

  • Create and apply rules to adaptive form fields.
  • Use rules to trigger form data model services to update the data to database.

See the Guide

Step 4: Style your adaptive form

adapative-form-styling

Adaptive forms provide themes and an editor to create themes for the adaptive forms. A theme contains styling details for components and panels, and you can reuse a theme in different forms. Styles include properties such as background colors, state colors, transparency, alignment, and size. When you apply the theme to your form, the specified style reflects on corresponding components of your form. Adaptive forms also support in-line styling for styles specific to a form.

Goals:

  • Apply an out of the box theme to an adaptive form.
  • Create a theme for adaptive form using the theme editor.
  • Use Web Fonts in a custom theme.

See the Guide

Step 5: Publish your adaptive form

12-publish-your-adaptive-form-_small

You can publish adaptive forms as a stand-alone form (single page application), include in AEM Sites page, or list on an AEM Site using Forms Portal.

Goals:

  • Publish the adaptive form as an AEM Page.
  • Embed the adaptive form in an AEM Sites Page.
  • Embed the adaptive form in an external webpage (a non-AEM webpage hosted outside AEM).

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

Rapid Feature Releases with AEM Cloud: Telegraph Media Group’s RDE Strategy

Online | Session | Intermediate

Hear how Telegraph Media Group, the award-winning publisher of The Daily Telegraph, The Sunday Telegraph, The Telegraph Magazine,...

Wed, Mar 19, 3:30 PM PDT (10:30 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