You can use the WebHooks Add-On to send data from your forms to any custom page or script you like. This page can perform integration tasks to transform, parse, manipulate and send your submission data to wherever you choose.
If you are developing an application that needs to be updated every time a form is submitted, WebHooks is for you. The advantage of WebHooks is that the passing of data is immediate and you can pass all submitted form data at once.
What's a WebHook?
A WebHook is just a push notification from Easy Forms to another server every time someone submits your forms.
What can you do with a WebHook?
WebHooks makes easier to integrate two systems. The most common use for a WebHook is to feed leads into your CRM. But there are lots of other things you could do as well.
What Do You Need?
The very nature of a WebHook assumes that you have some ability to write code (or bribe a friend or colleague who does). You need to have a server that can accept a POST request (the one you’d get from a form submission), and be able to write a script that does something in response.
Note: Easy Forms support the integration of multiples WebHooks by form.
To install WebHooks add-on follow the Install an add-on from Add-On Manager documentation instructions.
To create a WebHook, you must perform the following steps:
Note: Select multiple forms to create the same WebHook for each form.
To stop a webhook temporarily, you can choose to disable and enable later. To disable a form webhook, you must follow these steps:
To delete a WebHook, you must perform the following steps:
The WebHooks Manager will reload and the selected WebHook will be deleted.
To send the post data as a JSON string, you must follow these steps:
Now that you know what are WebHooks and how to use them in Easy Forms, let's see an example.
Note: You can follow this tutorial using the Easy Forms demo. But keep in mind that our demo page will refresh every 15 minutes.
In this tutorial we are going to send notifications from one of our forms to the page: Beeceptor. This page captures our notifications and printed them on screen.
Very Good! Know you have a URL that will serve to receive notifications sent by Easy Forms.
If your submission is received, a success message will appear.
Now, go to Endpoint Url (and without refresh the page) you will see that the notification contains:
And that’s it! You have sent your first notification to another server. Congratulations!
Now that we know how to export Form Submissions in real time to an external application, we will see how we can store these submissions in a database.
If you have a website, you can perform the following steps and store Form Submissions of our Demo Form in your own database, you just need to change the WebHook URL.
Note: You can Follow this tutorial using our Easy Forms demo. Keep in mind that our demo page will refresh every 15 minutes.
1.- Create a database: 'test'. You can do this with your favorite software, such as phpMyAdmin or also using the following MySQL command:
2.- Create a database table: 'subscribers', with 4 fields: id, name, email and ip_address. You can run the following MySQL query:
3.- Setup the information to your database: 'test'. The @app/custom/saveToDB.php
file allows you to configure the following parameters:
4.- Upload the @app/custom/saveToDB.php file to your server.