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.
Step 1: Create an adaptive form
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.
Step 2: Create Form Data Model
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.