Business and Enterprise plans
Data connections are widgets that allow what someone enters into the form to be sent to a third party application.
There are two kinds of data connections - end-of-form and mid-form. Here are some ideas for how to use these:
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.
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.
From the main menu, go to Admin > Integrations > Data connections. This is where you can create and manage any connections.
Choose to either Import connections or manually Add connection, or click on an existing connection to manage it.
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.
Save your changes.
The data connection’s ready to use in your forms. You can always update it whenever you need to.
Add your 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
- Open a form from My forms.
- Choose a field you want to add the connection to, and select the gear icon to open its settings.
- 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.
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.