Custom form triggers let you perform custom business logic on a successful form submission, e.g. sending form submission data to an e-mail address of your choice, or maybe sending the data via an HTTP request, issued to your custom API endpoint.
To learn more about built-in triggers and triggers in general, visit the Triggers article.
Creating a custom trigger can be achieved by registering a simple
form-trigger-handler plugin in the Form Builder API. In other words, in the
Consider the following example:
As we can see, the two properties that need to be defined are
handle, which, respectively, define the name of the trigger, and the logic that needs to be executed. In this particular example, we are executing the
send method on an imaginary e-mail client -
Click here to check out the full example.
Note that the
handle callback function can be an async function. Also, there is no limit when it comes to the number of triggers that can be defined.