1. Home
  2. Hooks
  3. Hook reference: wpforms_process

do_action( 'wpforms_process', array $fields, array $entry, array $form_data )

Hook that fires during form entry processing, after initial field validation has passed.

Description

The wpforms_process hook fires towards the end of form entry processing. It runs after all initial form fields have been validated and sanitized.

This hook should be used when the action potentially needs to return an error and halt form processing (see More Information below for details). Examples: verify if a user account exists or validate data for a payment gateway.

Please remember that the form processing can still be halted/prevented after this hooks fires, by other code using the same hook. See the note below about another similar hook that fires after all validation is passed.

An alternate version of this hook is available to easily limit by form ID, wpforms_process_{$form_id}.

Important note: If you are doing processing and do not need validation or need the entry ID, see wpforms_process_complete.

Parameters

$fields
(array) Sanitized entry field values/properties.
$entry
(array) Original $_POST global.
$form_data
(array) Form settings/data.

Source

wpforms/includes/class-process.php

More Information

None.

Updated on April 19, 2018

Was this article helpful?