AEM Forms · updated

What is a form data model, and how does prefill work?

A form data model (FDM) is a single description of the business data a form uses, built on top of one or more back-end data sources. A form based on an FDM can be filled in advance from those sources and can write the submitted data back to them. On Cloud Service it connects to databases, REST, SOAP and OData services, Microsoft Dynamics, Salesforce and Azure Blob Storage.

In plain words

Without an FDM, each form needs its own code to fetch and save data. With one, the form's fields are tied to named items such as 'customer' or 'policy', and AEM Forms does the fetching and saving. The same model can serve many forms.

What Adobe says an FDM is used for

  • Creating adaptive forms and fragments whose fields are bound to data model objects.
  • Previewing a form with sample data generated in the FDM editor.
  • Prefilling a form when it is rendered.
  • Writing submitted data back to the data source with the 'Submit using Form Data Model' action.
  • Invoking a data source service from a rule in the rule editor.

Data sources supported out of the box

TypeDetail from Adobe's page
Relational databasesMySQL, Microsoft SQL Server, IBM DB2, PostgreSQL, Azure SQL and Oracle RDBMS; configured as a JDBC pool in the web console configuration
RESTful web servicesConfigured as a cloud service; notable changes page says OpenAPI 2.0 and 3.0 are supported
SOAP-based web servicesConfigured as a cloud service
OData servicesVersion 4.0
Business applicationsMicrosoft Dynamics and Salesforce
StorageMicrosoft Azure Blob Storage

Authentication types supported out of the box are OAuth 2.0 (authorization code and client credentials), basic authentication and API key, and custom authentication can be implemented. A relational database needs advanced networking enabled through the Cloud Manager API, because ports are closed by default, and the JDBC driver added as a Maven dependency.

Prefill

AEM Forms ships a Form Data Model Prefill service. It queries the data sources for the data model objects used in the form and fills the fields while the form is rendered. On Cloud Service, Adobe's list of differences says the prefill service fetches data from the server and merges it on the client side, and can be configured to merge on the server instead.

Things Adobe says Cloud Service does not support for data sources: mutual SSL for the REST connector and x509 certificate authentication for SOAP data sources. The form data model can submit data to HTTP and HTTPS endpoints only.

How to turn on FDM prefill

  1. Configure the data source (cloud service configuration for REST, SOAP or OData; JDBC pool configuration for a database).
  2. Create the form data model and add the data model objects and services the form needs.
  3. Create the adaptive form with Form Data Model selected as its form model.
  4. Open the Adaptive Form Container properties and, in the Basic section, choose 'Form Data Model Prefill service' in the Prefill Service list.
  5. Preview with sample data from the FDM editor, then test against the real source.

Related tools and pages on this site

Questions

Can an FDM write data as well as read it?

Yes. The 'Submit using Form Data Model' submit action writes the submitted data for a data model object to its data source. It is available only for forms based on an FDM.

Can a form attachment go to a database?

Yes. Adobe describes binding a file attachment field to a binary property in the FDM and enabling 'Submit Form Attachments' in the container's Submission section.

Does prefill work for forms on Edge Delivery Services?

Adobe documents a prefill service for adaptive forms authored in the Universal Editor, using a form data model or a draft service as the data source.

Sources

Facts about Adobe's products on this page are from the linked Adobe pages, read on the date shown beside each. Explanations, steps and examples are ours unless marked as Adobe's. If Adobe's page and this one differ, Adobe's page is right.

Surge Migrate is not affiliated with Adobe and claims no Adobe partner status. Adobe product names are trademarks of Adobe.

Surge Migrate

Moving the website itself

This page answers one AEM Forms question. Surge Migrate moves a website from any CMS to any CMS. Converted automatically. Checked before you install.

  1. 1

    Scan

    Names the system behind your site, counts pages and templates, lists the blocks to build and the work no tool does, and gives an effort range with its working.

    Scan a site →
  2. 2

    Convert

    Each page becomes an Edge Delivery document, an AEM Core Component page and import files for 7 other systems. 10 pages free; 500 or 2,000 pages in one paid run.

    Convert your pages →
  3. 3

    Verify

    A download is offered only when its own format check passes. The report lists every field not found and every component kept as plain content. Compare old and new pages side by side.

    Parity check →
  4. 4

    Install

    You import with the target system's own tool, on your own environment. Each download's README gives the command. Your system changes only when you run it.

    How each import was tested →