Early Bird Lifetime Deal
Bit Flows Automation Tool Like Zapier in WordPress
Deal Will Be Ends: 28 February
00

days day

00

hours hour

00

Mins Mins

00

Secs Secs

Bit Form Logo
Estimated reading: 10 minutes 734 views

PHP Action Hooks – Bit Form

The Bit Forms plugin provides several PHP action hooks that allow you to customize and extend its functionality. These action hooks enable you to perform specific tasks at different stages of the form submission process. Example: bitform_submit_success

Here are some of the main Bit Forms PHP action hooks:​

  1. bitform_submit_success
  2. bitform_update_success
  3. bitform_validation_error
  4. bitform_submit_error
  5. bitform_save_entry
  6. bitform_save_entry_error
  7. bitform_update_entry
  8. bitform_update_entry_error
  9. bitform_after_update_entry_success
  10. bitform_onload_fields
  11. bitform_wp_user_auth_response
  12. bitform_mollie_transaction_success
  13. bitform_stripe_transaction_success
  14. bitform_paypal_transaction_success
  15. bitform_validation_success
  16. bitform_integration_run_failure

bitform_submit_success

Description

This action hook is fired after the form data has been saved to the database. It can be used to execute additional actions or integrations based on the submitted form data.

do_action('bitform_submit_success', $formId, $entryId, $formData, $files);

Usage

The following would apply to all forms:

add_action('bitform_submit_success', 'submission_success', 10, 4);
function submission_success($formId, $entryId, $formData, $files)
{
// Write Your Code Here
}

Parameters

  • $formId (integer) Form ID
  • $entryId (integer) Entry ID of this response
  • $formData (array) Entry Response as key value pairs array as input name as array key
  • $files(array): An associative array of items uploaded to the form

bitform_update_success

Description

This action hook is fired after the form data has been update to the database. It can be used to execute additional actions or integrations based on the updated form data.

do_action('bitform_update_success', $formId, $entryId, $formData, $files);

Usage

The following would apply to all forms:

add_action('bitform_update_success', 'update_success', 10, 4);
function update_success($formId, $entryId, $formData, $files)
{
// Write Your Code Here
}

Parameters

  • $formId (integer) Form ID
  • $entryId (integer) Entry ID of this response
  • $formData (array) Entry Response as key value pairs array as input name as array key
  • $files(array): An associative array of items uploaded to the form

bitform_validation_error

Description

This action hook is fired when an error occurs during form submission.

do_action('bitform_validation_error', $formId, $isValidated);

Usage

The following would apply to all forms:

add_action('bitform_validation_error', 'field_validation_fail', 10, 2);
function field_validation_fail($formId, $isValidated)
{
// Write Your Code Here
}

Parameters

  • $formId (integer) Form ID
  • $isValidated (boolean) True or False

bitform_submit_error

Description

This action hook is fired when an error occurs during form submission.

do_action('bitform_submit_error', $formId, $isSubmitted);

Usage

The following would apply to all forms:

add_action('bitform_submit_error', 'form_validation', 10, 2);
function form_validation($formId, $isSubmitted)
{
// Write Your Code Here
}

Parameters

  • $formId (integer) Form ID
  • $isValidated (boolean) True or False

bitform_save_entry

Description:

This action hook fires before the form entry is saved to the database. This action hook is called when submitted form. The action hook receives the submitted data and form ID as a parameter.

do_action('bitform_save_entry', $submitted_data, $this->form_id);

Usage:

The following example shows how to use this action hook.

add_action('bitform_save_entry', 'your_function_name', 10, 3);

function your_function_name($submittedData, $formId) {
    // Do something here
}

Parameters:

  • $submittedData (array) (required) The submitted data as an array.
  • $formId (int) (required) The form ID.
$submission_data = [
    // fieldKey => value
    'b1-1' => 'value1',
    'b1-2' => 'value2',
]

bitform_save_entry_error

Description:

This action hook fires when the form entry is not saved to the database and throw error. This action hook is called when submitted form for save entry. The action hook receives this class instance(object), the submitted data, and form ID as a parameter.

do_action('bitform_save_entry_error', $this, $submitted_data, $this->form_id);

Usage:

The following example shows how to use this action hook.

add_action('bitform_save_entry_error', 'your_function_name', 10, 3);

function your_function_name($formManager, $submittedData, $formId) {
    // Do something here
}

Parameters:

  • $formManager (object) (required) The form manager class instance.
  • $submittedData (array) (required) The submitted data as an array.
  • $formId (int) (required) The form ID.
$submission_data = [
    // fieldKey => value
    'b1-1' => 'value1',
    'b1-2' => 'value2',
]

bitform_update_entry

Description:

This action hook fires before the form entry is updated to the database. This action hook is called when update form entry. The action hook receives this class instance, the updated data, form ID, and entry ID as a parameter.

do_action('bitform_update_entry', $this, $updatedValue, $formID, $entryID);

Usage:

The following example shows how to use this action hook.

add_action('bitform_update_entry', 'your_function_name', 10, 3);

function your_function_name($formManager, $updatedValue, $formID, $entryID) {
    // Do something here
}

Parameters:

  • $formManager (object) (required) The form manager class instance.
  • $updatedValue (array) (required) The updated data as an array key as field key and value pair.
  • $formID (int) (required) The form ID. $entry_id (int) (required) The entry ID.
$updatedValue = [
    'b1-1' => 'value1',
    'b1-2' => 'value2',
]

bitform_update_entry_error

Description:

This action hook fires when the form entry is not updated to the database and throw error. This action hook is called when update form entry. The action hook receives this class instance, the updated data, form entry meta update status wp error and form ID as a parameter.

do_action('bitform_update_entry_error', $this, $updatedValue, $formEntryMetaUpdateStatus, $formID);

Usage:

The following example shows how to use this action hook.

add_action('bitform_update_entry_error', 'your_function_name', 10, 3);

function your_function_name($formManager, $updatedValue, $formEntryMetaUpdateStatus, $formID) {
    // Do something here
}

Parameters:

  • $formManager (object) (required) The form manager class instance.
  • $updatedValue (array) (required) The updated data as an array key as field key and value pair.
  • $formEntryMetaUpdateStatus WpError (required) The form entry meta update status.
  • $formID (int) (required) The form ID.
$updatedValue = [
    'b1-1' => 'value1',
    'b1-2' => 'value2',
]

bitform_after_update_entry_success

Description:

This action hook fires after the form entry is updated to the database. This action hook is called when updated data successfully in database. The action hook receives this class instance, the updated data, form ID, and entry ID as a parameter.

do_action('bitform_after_update_entry_success', $this, $updatedValue, $formID, $entryID);

Usage:

The following example shows how to use this action hook.

add_action('bitform_after_update_entry_success', 'your_function_name', 10, 3);

function your_function_name($formManager, $updatedValue, $formID, $entryID) {
    // Do something here
}

Parameters:

  • $formManager (object) (required) The form manager class instance.
  • $updatedValue (array) (required) The updated data as an array key as field key and value pair.
  • $formID (int) (required) The form ID.
  • $entryID (int) (required) The entry ID.
$updatedValue = [
    'b1-1' => 'value1',
    'b1-2' => 'value2',
]

bitform_onload_fields

Description

This action hook fires when the form fields are loaded. This action hook is called when the form fields are loaded. The action hook receives the form fields and the form ID as a parameter.

do_action('bitform_onload_fields', $fields, $formID);

Usage

The following example shows how to use this action hook.

add_action('bitform_onload_fields', 'function_name', 10, 3);

function function_name($fields, $formId)
{
// Write Your Code Here
}

Parameters:

  • $fields (array) (required) The form fields.
  • $formID (int) (required) The form ID.

bitform_wp_user_auth_response

Description:

This action hook is triggered after the WordPress user authentication. The action receives the response as an array, the submitted data as an array, and the parameter as a parameter.

do_action('bitform_wp_user_auth_response', $result, $form_id, $_POST, $parameter);

Usage:

The following example shows how to use the action hook.

add_action('bitform_wp_user_auth_response', 'your_function_name', 10, 4);
function your_function_name($result, $formId, $submittedData, $urlParameter) {
    // Your code here
}

Parameters:

  • $result (array) (required) The response of the WordPress user authentication as an array.
  • $formId (int) (required) The form id.
  • $submittedData (array) (required) The submitted data as an array.
  • $urlParameter (array) (required) The parameter.

bitform_mollie_transaction_success

Description:

This action hook fires after the Mollie transaction is successfully completed. This action hook is called when the Mollie transaction is successfully completed. The action hook receives the Mollie payment object, the form ID, and the entry ID as a parameter.

do_action('bitform_mollie_transaction_success', $formID, $entryID, $fieldKey, $mollieDataSting);

Usage:

The following example shows how to use this action hook.

add_action('bitform_mollie_transaction_success', 'your_function_name', 10, 4);
function your_function_name($formID, $entryID, $fieldKey, $mollieDataSting) {
// Do something here
}

Parameters:

  • $formID (int) (required) The form ID.
  • $entryID (int) (required) The entry ID.
  • $fieldKey (string) (required) The field key.
  • $mollieDataSting (string) (required) The Mollie payment object.

bitform_stripe_transaction_success

Description:

This action hook fires after the Stripe transaction is successfully completed. This action hook is called when the Stripe transaction is successfully completed. The action hook receives the Stripe payment object, the form ID, and the entry ID as a parameter.

do_action('bitform_stripe_transaction_success', $formID, $entryID, $fieldKey, $stripeDataSting);

Usage:

The following example shows how to use this action hook.

add_action('bitform_stripe_transaction_success', 'your_function_name', 10, 4);
function your_function_name($formID, $entryID, $fieldKey, $stripeDataSting) {
// Do something here
}

Parameters:

  • $formID (int) (required) The form ID.
  • $entryID (int) (required) The entry ID.
  • $fieldKey (string) (required) The field key.
  • $stripeDataSting (string) (required) The Stripe payment object.

bitform_paypal_transaction_success

Description:

This action hook fires after the PayPal transaction is successfully completed. This action hook is called when the PayPal transaction is successfully completed. The action hook receives the PayPal payment object, the form ID, and the entry ID as a parameter.

do_action('bitform_paypal_transaction_success', $formID, $entryID, $fieldKey, $paypalDataSting);

Usage:

The following example shows how to use this action hook.

add_action('bitform_paypal_transaction_success', 'your_function_name', 10, 4);
function your_function_name($formID, $entryID, $fieldKey, $paypalDataSting) {
// Do something here
}

Parameters:

  • $formID (int) (required) The form ID.
  • $entryID (int) (required) The entry ID.
  • $fieldKey (string) (required) The field key.
  • $paypalDataSting (string) (required) The PayPal payment object.

bitform_validation_success

Description:

This action hook fires after the form validation is successfully completed. This action hook is called when the form validation is successfully completed. The action hook receives the form ID as a parameter.

do_action('bitform_validation_success', $this->_form_id);

Usage:

The following example shows how to use this action hook.

add_action('bitform_validation_success', 'your_function_name', 10, 1);
function your_function_name($formID) {
// Do something here
}

Parameters:

  • $formID (int) (required) The form ID.

bitform_integration_run_failure

Description:

This action hook fires when the integration is not run successfully. This action hook is called when the integration is not run successfully. The action hook receives the integration ID and the form ID as a parameter.

do_action('bitform_integration_run_failure', $this->_form_id);

Usage:

The following example shows how to use this action hook.

add_action('bitform_integration_run_failure', 'your_function_name', 10, 2);
function your_function_name($integrationID, $formID) {
// Do something here
}

Parameters:

  • $integrationID (int) (required) The integration ID.
  • $formID (int) (required) The form ID.

Share this Doc

PHP Action Hooks

Or copy link

CONTENTS
Subscribe for New Integrations Alert!
Join Community
4000+ Member's
Bit Apps
4000+ Videos
bit form dark logo
© 2025 All rights reserved by Bit Apps.
Follow us
© 2024 ABC. All rights reserved by Bit Apps.