This action is called just before any Caldera Forms processors run. It happens after field validation occurs. This action is sometimes needed because a payment processor might stop submission — if payment is invalid — without triggering an email notification.
This action is passed 3 parameters:
- $form – The form config array
- $referrer – The referrer object (host, path, query string)
- $process_id – The unique id given to the form process
Get All Data Form Submission Before Processors Run
This action happens one line before any processors start, which may stop submission, you can use this action to get all of the data in your form. This is useful for creating additional notifications that might not otherwise send. To start, here is a basic example of how to get all of that data, with no implementation –
Send An Extra Email Before Processing The Form
This next example builds on the last one. It starts the same, but gives an example of how to send an extra email notification, using the settings form the email tab, but using a different subject and email addresses –
Send Form Data To Zapier Before Completing Processing
This example will only work if you have our Zapier add-on active. By default the Zapier webhook is triggered after the pre-process stage where payment processors run. You can use this hook to trigger an extra webhook before the pre-process stage:
Where Does This Code Go?
When using WordPress hooks to customize Caldera Forms or other plugins you should not modify the plugin files, or you will lose your changes when you update the plugin. Instead you should create a small plugin to hold the custom code. It's easy, learn how here.
Technically you can add the custom code to your theme's functions.php, but then you will not be able to change your theme and keep these customizations.