Send data out to 3rd party site for a response - webhook add-on?

We are setting up a form where we need to validate a particular dealer ID on another system. We were looking to use the Webhooks add-on to send the dealer ID over to the 3rd party site which is being customized for our connection. After sending the Dealer ID over to the 3rd party system, that system will return a true (Dealer ID exists) or false (Dealer ID doesn’t exist). If true, we’ll use that Dealer ID that was entered for other parts of our form process. If it returns false we’ll want to display a notification that the Dealer ID is incorrect.

The Webhook add-on I can see can easily send the dealer ID out to the 3rd party site but I can’t find how best to receive and handle the response in GF. Anybody set something like this up? If so, did you need to use a custom function in the functions.php file?

Any tips or direction would be very grateful. Thank you!

The Webhooks add-on was designed to send data at the end of the form submission process. Because you want to use your API response for other things in the form, well before submission, you will need to use something other than the Webhooks add-on.

You will have to use some custom code, which could be tied to gform_field_validation or gform_pre_render (either, on a multi-page form).

This will require some PHP by you, as this is not a built in feature of Gravity Forms. We give you the hooks and filters at the right times, but you will need to create the code that checks the API and returns the response, then do something in your form with that response.

Thanks Chris. That’s what I was thinking but wanted to ask just to confirm. Appreciate the quick reply.

1 Like