Web Hooks Overview
Web Hooks Overview: Types of Web Hooks
There are 3 different types of Web Hooks you can create. They are:
- Before Submit Hook
The Before Submit Hook runs after a user clicks submit on your form, but before the database is updated (and before emails are sent, PDF's generated etc). You can abort a submission conditionally via a Before Show Hook, make remote API calls, and update values before they get recorded in the database. The Before Submit Hook is the best place to manipulate and format form submission data before it is written to the database.
- After Submit Hook
The After Submit Hook runs after the submission has already been recorded in the database. An After Submit Hook can still update form values (and the database), make remote API calls and set a redirect URL. The After Submit Hook is the most commonly used Web Hook because it has access to the record_id after the form data is recorded in the database. This would be used typically when communicating with a 3rd party API.
- Before Show Hook
A Before Show Hook runs before a form is shown. You can check for a cookie you planted earlier, or URL parameter (in the query string), and set values to pre-populate the form with or redirect.