Deploying Adaptive Forms with Form Data Models to Production (or other environments)

Posted by

If you have an Adaptive Form that makes use of one or more form data models you’ll need to ensure you have the correct assets deployed and available on your production server to ensure proper operation.

RDBMS Bundles

Each of the forms data models based on an RDBMS source requires a database driver bundle to operate. In this case, we have a MySQL driver installed on the server. This same driver must be present on the destination server.

Go to and ensure the proper driver is deployed and is in an Active state without any missing dependencies.


If you are deploying a custom package, the driver can be automatically installed and deployed by placing it in an ‘install’ directory. Most operators will likely prefer that drivers are installed separately.

Apache Sling Connection Pooled DataSource

When data models are added, data sources added to the Apache Sling Connection Pooled DataSource can be selected as sources of data. In this case, a pooled datasource named “auroraMySQL” is visible in the “Select Datasource” step.


The default location for the pooled datasource can be found under /apps/system/config (along with other configuration items not associate specifically with an application). This configuration can be left intact or may be placed in separate and config.publish folders which control where each configuration becomes active depending on the run mode of the instance. In the example below, there are configurations for both author and publish with distinct connection and security parameters. As mentioned, when a new configuration is created, it will simply be placed in the default config directory. Creating the additional run mode folders is optional (but recommended).


This folder can be included in a custom package to include the pool definition with your deployment.

The Form Data Model

When a form data model is open in the FDM editor, you’ll clearly see the location of the configuration file in the URL.


In this case, the editor shows meaning the FDM configuration currently being edited is stored in /content/dam/formsanddocuments-fdm/auroraMysql.

This folder can be included in a custom package to include the FDM definition with your deployment.

Note that the form data model properties file can be downloaded directly by selecting Download from the Data Integrations interface. It will also be automatically included in any form download that references the FDM directly as a property or when called as a service in the form. .

The Adaptive Form

Adaptive Forms are stored in two locations. The “dam” and the “form”. The “dam” contains the form metadata and other configuration details whereas the “form” contains the actual definition of the entire form and its contents.


In this example we have a form in the editor named “quick-form”. From the URL we can determine that this form is in a folder named “acs-forms-samples” from the root of the forms manager.

In CRX we would find two entries for this form: /content/dam/formsanddocuments/acs-forms-samples and /content/forms/af/acs-forms-samples/quick-form.

Both of these folders would need to be included in a custom package to ensure the form could be found, and would function. The “dam” entry is used by the search and lister and the “forms” entry contains the makeup of the form itself.

Note again that the form can be easily downloaded directly by selecting download from the Form Manager interface. The bundle created from the Form Manager will include the form (dam+content), any associated themes and styles, and any data models used inside the form itself. This bundle would include everything you need except the pool definition and required drivers.

Deployment Check List

  1. Driver Bundles for each RDBMS used by your form data models.
  2. All Apache Sling Connection Pooled DataSources access by your form data models with the proper configurations / urls / credentials for the destination environments. Note that configurations can be included and then modified on the destination server if needed.
  3. Form data model definitions.
  4. Form definitions
  5. [optional] Form themes
  6. [optional] Custom client libraries
  7. Appropriate SQL to be executed in preparation for deployment. ie: table creation, etc.