Creating Forms with Form Data Model in Universal Editor
In the Universal Editor, you can create:
- Schema-based form: A schema-based form uses a data source configured during form creation in the Data tab, automatically binding data to form fields.
- Non-schema-based form: A non-schema-based form requires you to manually add a data source and bind each field from the content tree.
These methods give you the flexibility to connect data models with forms based on your needs.
Schema-Based Form
When you create a schema-based form, it is automatically configured with a data source, and the form fields are already linked to the data through data bindings. To create a schema-based form using the Form Creation wizard, perform the following steps:
-
Log in to your Experience Manager Forms Author instance.
-
Enter your credentials on the Experience Manager login page. After you are logged in, in the upper-left corner, select Adobe Experience Manager > Forms > Forms & Documents.
-
Select Create > Adaptive Forms. The Wizard opens. In the Source tab, select a template:
When you select a Edge Delivery Services based template, the Create button is enabled. You can go to the Data Source or Submission tabs to select a data source or submit action.
-
In the Data tab, you can select one of the following data models:
-
Form Data Model (FDM): Integrate data model objects and services from data sources into your form. Choose Form Data Model (FDM) if your form requires reading and writing data from multiple sources.
-
JSON Schema: Integrate your form with a backend system by associating a JSON schema that defines the data structure. It allows you to add dynamic content using the schema elements.
For example, select the created Form Data Model named Pet Form Data Model.
By default, all fields of the associated JSON schema or Form Data Model (FDM) are automatically selected and converted into corresponding form components, simplifying the authoring process. The wizard also allows you to selectively choose which fields to include in the form using checkboxes.
-
-
Click Create and the Create Form wizard appears.
-
Specify the Name and Title.
-
Specify the GitHub URL. For example, if your GitHub repository is named
edsforms
, it is located under the accountwkndforms
,the URL is:https://github.com/wkndforms/edsforms
-
Click Create.
As soon as you click Create, the form opens in the Universal editor for authoring.
The form is created using the data elements from the associated data source, with the form fields having preconfigured data binding.
You can now add and configure the submit action for your form.
Non-Schema-Based Form
When you create a non-schema-based form, no data source is configured. You can edit the form properties later to add a data source and manually configure data bindings for your form fields. Perform the following steps to edit the form properties and add a data source:
-
Log in to your Experience Manager Forms Author instance.
-
Enter your credentials on the Experience Manager login page. After you are logged in, in the upper-left corner, select Adobe Experience Manager > Forms > Forms & Documents.
-
Select the form for which you want to add data source and click Properties.
The form properties open.
-
Click to open the Form Model tab, and from the Select From drop-down menu. You can select one of the following options:
-
Form Data Model (FDM): Create the form using a form data model.
-
Connector: Create the form using the Adobe Marketo data source.
-
Schema: Create the form using a JSON schema uploaded to AEM Forms.
-
None: Create the form from scratch without using any form model.
For example, select the Form Data Model (FDM)
-
-
Select the created Form Data Model (FDM) from the drop-down list. For example, select the created Form Data Model named Pet Form Data Model from the drop-down list.
When you select the Form Data Model (FDM), the warning dialog appears. Click OK to close the dialog.
-
Click Save & Close.
-
Open the form for editing. The form opens in the Universal Editor for authoring.
The form elements present in the associated Form Data Model (FDM) are displayed in the Datasource tab of the Content Browser in the Properties Panel.
-
Select the data elements from the Datasource tab and click Add.
You can also drag-drop these elements to build your Adaptive Form. When you click Add, the selected elements from the Datasource tab are added to your form, and a tick mark appears in front of the added elements.
You can add data binding to a form field by selecting it from the Bind Reference property. For example, let’s add a data binding reference to the Id text box that is already present in the form.
To select the data binding for the form field from the data source tree, perform the following steps:
-
Open the properties of the form field for which you want to add the data bind reference.
-
Go to the Bind Reference property and click the Browse icon.
-
Choose the data binding reference from the data source tree in the Select a Bind Reference wizard.
-
Select the data element from the data source tree that you want to bind to the form field and click Select.
The form field binds to the data element and it appears in the Bind Reference property.
You can also manually edit the Bind Reference property for the form field.
You can now add and configure the submit action for your form.