Create an adaptive form based on a form data model

AEM Forms data integration lets you integrate multiple data sources and bring their entities and services together to create a form data model. It is an extension of JSON schema. You can use a form data model to create an adaptive form. The entities or data model objects configured in a form data model are available as data model objects for form authoring. They are bound to respective data sources and used to prefill a form and write submitted data back to the respective data sources. You can also invoke services configured in a form data model using adaptive form rules.

To use a form data model for creating an adaptive form:

  1. In Form Model tab on Add Properties screen, select Form Data Model in the Select From drop-down list.

    create-af-1-1

  2. Tap to expand Select Form Data Model. All available form data models are listed.

    Select a from data model.

    create-af-2-1

NOTE
You can also change the form data model for an adaptive form. For detailed steps, see Edit Form Model properties of an adaptive form.

Create an adaptive form based on an XFA Form template

You can repurpose your XFA form templates to create adaptive forms. To repurpose, upload and associate an XFA form template with an adaptive form. The elements of the Form Template (XFA form) are made available for use in the content finder at the time of adaptive form authoring. From the Content Finder, you can drag-and-drop the form template elements on the form.

NOTE
Upload the XFA Form Template to AEM Forms before you start creating an adaptive form based on the form template.

Do the following to use an XFA form template as form model for your adaptive form:

  1. On the Add Properties page, open the Form Model tab.

  2. In the Form Model tab, from the drop-down list, select Form Templates. All the form templates that are uploaded to the repository via AEM Forms UI are listed for selection. Select a template from the list.

    Associate XFA Form Template with an Adaptive Form
    Figure: Selecting a form template

    NOTE
    You can also change the form template for an adaptive form. For detailed steps, see Edit Form Model properties of an adaptive form.

Create an adaptive form based on XML or JSON schema

XML and JSON schemas represent the structure in which data is produced or consumed by the back-end system in your organization. You can associate a schema to an adaptive form and use its elements to add dynamic content to the adaptive form. The elements of the schema are available in the Data Model Object tab of the content browser for authoring adaptive forms. You can drag-drop the schema elements to build the form.

See the following documents to understand how to design XML or JSON schema for authoring adaptive forms.

Do the following to use XML or JSON schema as form model for an adaptive form:

  1. On the Add Properties step of adaptive form creation page, tap on the Form Model tab.

  2. In the Form Model tab, select Schema from the Select From drop-down field.

  3. Tap Select Schema and do one of the following:

    • Upload from disk - Select this option and tap Upload Schema Definition to browse and upload an XML schema or JSON schema from your file system. The uploaded schema file resides with the form and is not accessible to other adaptive forms.
    • Search in repository - Select this option to select from the list of schema definition files available in the repository. Select the XML or JSON schema file as form model. The selected schema will be associated with the form by reference and will be accessible for use in other adaptive forms.
    CAUTION
    Ensure that the JSON schema filename ends with .schema.json. For example: mySchema.schema.json

    Selecting XML or JSON schema
    Figure: Selecting XML or JSON schema

  4. (For XML schema only) After you select or upload an XML Schema, specify a root element of the selected XSD file to map with the adaptive form.

    Selecting XSD root element
    Figure: Selecting XSD root element

NOTE
You can also change the schema for an adaptive form. For detailed steps, see Edit Form Model properties of an adaptive form.

Adaptive form templates

A template provides a basic structure and defines appearance (layouts and styles) of an adaptive form. It has pre-formatted components containing certain properties and content structure. Out of the box, AEM Forms provides some adaptive form templates. To get the complete template package including advanced templates, you need to install the AEM Forms add-on package. For more information, see Installing AEM Forms add-on package.

In addition, you can use the template editor to create your own templates. For more information about working with templates, see Adaptive form templates.

NOTE
When you open an adaptive form created using the advanced template for editing, an error message appears. The advanced template has a Signature Step component and Acrobat Sign is enabled for it by default. Create and select an Acrobat Sign cloud configuration and configure a signer to resolve the error.

Edit Form Model properties of an adaptive form

Adaptive forms are created without a form model (using the None option for form model) or using a form model such as a form template, XML schema or JSON schema, or form data model. You can change the form model for an adaptive form from None to another form model. For adaptive form based on a form model, you can choose another form template, XML schema, JSON schema, or form data model for the same form model. However, you cannot change from one form model to another.

  1. Select the adaptive form and tap the Properties icon.

  2. Open the Form Model tab and do one the following.

    • If the adaptive form is without a form model, you can choose another form model and accordingly select a form template, XML or JSON schema, or form data model.
    • If the adaptive form is based on a form model, you can choose another form template, XML or JSON schema, or form data model for the same form model.
  3. Tap Save to save the properties.