We noticed that JavaScript is disabled in your browser. We suggest enabling it for a better experience.
We noticed you're using an older version of Internet Explorer. We suggest you update to the latest version for a better experience.
Skip to main content

Use data connections to validate, retrieve or lodge data for your form

Business and Enterprise plans

Data connections allow information to pass between a form and a third-party service, such as a database. They can be used to validate, retrieve, or lodge data.

The flow of information can be one-way (such as as lodging response data at the completion of a form) or two-way(for example, when using a database to populate predictive search results).

Types of data connections

We differentiate data connections by their position in a form. You can add them at the end of a form, or in the middle of a form.

Type  How they work

End-of-form connections

Business and Enterprise plans

These data connections are usually (but not always) less complex one-way connections. Once a user has completed a form, an end-of-form connection can, for example:

  • Send a notification email to the respondent or the form author

  • Lodge the form information in a CRM or DMS application and provide a receipt to the respondent (on screen and/or via email)

Mid-form connections

Enterprise plan

These data connections are used to send and receive data prior to the completion of a form.

Mid-form connections are typically two-way, and used to validate or retrieve data from a third-party service. However, they can also be simple one-way connections, such as an analytics cue.

Mid-form connections can, for example:

  • Use information from a respondent’s entries to query a database and pre-fill other areas of a form

  • Validate respondent data (such as their address, if they are organizing waste collection)

  • Send analytics data to help understand form engagement (such as at what point respondents are dropping out of forms)

  • Return information to make a text field a predictive search

Create a data connection

Data connections use a standard JSON format to send and receive information. Before you set up a data connection, you might want to create a middleware application to translate information between OpenForms and your internal business systems.

Make sure your business systems have an API or some way for the middleware to connect to it. The middleware must also have a URL that OpenForms can send the JSON data to.

The form uses the custom middleware to communicate between your customer's computer and your company network. The middleware can send data to a DMS application, and send and receive data from a CRM application.

If you need more information about the JSON format, have a look at our examples.

You also need to make sure you’ve assigned external IDs to any fields you want to send or receive data from. To do this, open a form from My forms and select the gear icon next to a field. Open External ID and give it an ID. Fields can only have one ID.

Once you’ve done all this, create your data connection.

Only admins can create data connections in OpenForms. If you’re not an admin, you can still add an existing connection to a form.

  1. From the main menu, go to Admin > Integrations > Data connections. This is where you can create and manage any connections.

  2. Choose to either Import connections or manually Add connection, or click on an existing connection to manage it.

  3. Fill in all the necessary information. If you enter more than one external ID, separate them with commas.
    If your data connection is being used on a text field you can set it to act like a predictive search. Put the text field’s external ID in both the send and receive areas of the connection.

  4. Save your changes.

The data connection’s ready to use in your forms. You can always update it whenever you need to.

Add a data connection to a form

Add an end-of-form connection

Open a from from My forms and go to Settings > Data connections. Select which connections you want to trigger and save your form. The connection will be triggered when the user clicks Submit.

Add a mid-form connection

Enterprise plans

  1. Open a form from My forms.
  2. Choose a field you want to add the connection to, and select the gear icon to open its settings.
  3. Open the Advanced tab and choose the connection you want in the Data connections field.

After you've selected a connection it will show you the list of external IDs that it will be sending and receiving so you know which ones you need to apply within your form. You can only apply a single connection to a field, but you can apply more to a section.

The connection will be triggered when the user clicks Continue within the section you added it to.

If your data connection is being used to return values to pre-fill fields, it helps if you put those fields in a different section. It would be confusing if someone entered their name and email and triggered a connection to pre-fill a field that they'd already passed.

Congratulations, you’ve set up a data connection. If you’re stuck, it might help you to look at our code examples for setting up middleware.

Was this helpful?