Contact Form 7 6.2.5 has 28 actions and 93 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Contact Form 7 fires an action
add_action( 'wpcf7_admin_notices', function( $arg1, $current_action, $arg3 ) {
// Your code runs here.
}, 10, 3 );
// Change a value Contact Form 7 is about to use
add_filter( 'wpcf7_kses_allowed_html', function( $allowed_tags, $context ) {
// Change $allowed_tags here.
return $allowed_tags;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
wpcf7_admin_notices
actiondo_action( 'wpcf7_admin_notices', 'wpcf7', wpcf7_current_action(), null ); -
wpcf7_admin_warnings
actiondo_action( 'wpcf7_admin_warnings', 'wpcf7', wpcf7_current_action(), null ); -
wpcf7_admin_load
actiondo_action( 'wpcf7_admin_load', wpcf7_superglobal_get( 'page' ), wpcf7_current_action() ); -
wpcf7_kses_allowed_html
filterapply_filters( 'wpcf7_kses_allowed_html', $allowed_tags[$context], $context ); -
wpcf7_special_mail_tags
filterapply_filters( 'wpcf7_special_mail_tags', null, $mail_tag->tag_name(), $html, $mail_tag ); -
wpcf7_use_recaptcha_net
filterapply_filters( 'wpcf7_use_recaptcha_net', false ); -
apply_filters( 'deprecated_hook_trigger_error', true ); -
wpcf7_acceptance
filterapply_filters( 'wpcf7_acceptance', true, $this ); -
wpcf7_additional_mail
filterapply_filters( 'wpcf7_additional_mail', $additional_mail, $contact_form ); -
wpcf7_admin_init
actiondo_action( 'wpcf7_admin_init' ); -
wpcf7_admin_misc_pub_section
actiondo_action( 'wpcf7_admin_misc_pub_section', $post_id ); -
wpcf7_after_create
actiondo_action( 'wpcf7_after_create', $this ); -
wpcf7_after_flamingo
actiondo_action( 'wpcf7_after_flamingo', $result ); -
wpcf7_after_save
actiondo_action( 'wpcf7_after_save', $this ); -
wpcf7_after_update
actiondo_action( 'wpcf7_after_update', $this ); -
wpcf7_autop_or_not
filterapply_filters( 'wpcf7_autop_or_not', WPCF7_AUTOP, $options ); -
wpcf7_before_send_mail
actiondo_action_ref_array( 'wpcf7_before_send_mail', array( $this->contact_form, &$abort, $this, ) ); -
wpcf7_captcha_url
filterapply_filters( 'wpcf7_captcha_url', sanitize_url( $url ) ); -
wpcf7_collect_mail_tags
filterapply_filters( 'wpcf7_collect_mail_tags', $mailtags, $options, $this ); -
apply_filters( 'wpcf7_config_validator_available_error_codes', self::error_codes, $this->contact_form ); -
do_action( 'wpcf7_config_validator_validate', $this ); -
wpcf7_contact_form
actiondo_action( 'wpcf7_contact_form', $this ); -
apply_filters( 'wpcf7_contact_form_default_pack', $contact_form, $options ); -
apply_filters( 'wpcf7_contact_form_properties', $properties, $this ); -
apply_filters( "wpcf7_contact_form_property_{$name}", $val, $this ); -
wpcf7_contact_form_shortcode
filterapply_filters( 'wpcf7_contact_form_shortcode', $shortcode, $options, $this ); -
wpcf7_copy
filterapply_filters( 'wpcf7_copy', $new, $this ); -
wpcf7_dashboard_setup
actiondo_action( 'wpcf7_dashboard_setup' ); -
wpcf7_default_template
filterapply_filters( 'wpcf7_default_template', $template, $prop ); -
wpcf7_display_message
filterapply_filters( 'wpcf7_display_message', $message, $status ); -
wpcf7_do_doi
filterapply_filters( 'wpcf7_do_doi', ! $contact_form->is_false( 'doi' ), $agent_name, $args ); -
wpcf7_doi
actiondo_action_ref_array( 'wpcf7_doi', array( 'wpcf7_sendinblue', array( 'email_to' => $attributes['EMAIL'], 'properties' => $params, ), &$token, ) ); -
wpcf7_editor_panels
filterapply_filters( 'wpcf7_editor_panels', $panels ); -
wpcf7_enqueue_scripts
actiondo_action( 'wpcf7_enqueue_scripts' ); -
wpcf7_enqueue_styles
actiondo_action( 'wpcf7_enqueue_styles' ); -
wpcf7_feedback_response
filterapply_filters( 'wpcf7_feedback_response', $response, $result ); -
apply_filters( 'wpcf7_file_extension_safelist', $safelist ); -
wpcf7_flamingo_get_value
filterapply_filters( 'wpcf7_flamingo_get_value', $value, $field, $contact_form ); -
apply_filters( 'wpcf7_flamingo_inbound_message_parameters', $args ); -
wpcf7_flamingo_submit_if
filterapply_filters( 'wpcf7_flamingo_submit_if', array( 'spam', 'mail_sent', 'mail_failed' ) ); -
wpcf7_form_action_url
filterapply_filters( 'wpcf7_form_action_url', $action_url ); -
wpcf7_form_additional_atts
filterapply_filters( 'wpcf7_form_additional_atts', array() ); -
wpcf7_form_autocomplete
filterapply_filters( 'wpcf7_form_autocomplete', '' ); -
wpcf7_form_class_attr
filterapply_filters( 'wpcf7_form_class_attr', $class ); -
wpcf7_form_elements
filterapply_filters( 'wpcf7_form_elements', $this->replace_all_form_tags() ); -
wpcf7_form_enctype
filterapply_filters( 'wpcf7_form_enctype', '' ); -
wpcf7_form_id_attr
filterapply_filters( 'wpcf7_form_id_attr', preg_replace( '/[^A-Za-z0-9:._-]/', '', $options['html_id'] ) ); -
wpcf7_form_name_attr
filterapply_filters( 'wpcf7_form_name_attr', preg_replace( '/[^A-Za-z0-9:._-]/', '', $options['html_name'] ) ); -
wpcf7_form_response_output
filterapply_filters( 'wpcf7_form_response_output', $output, $class, $content, $this, $status ); -
wpcf7_form_tag
filterapply_filters( 'wpcf7_form_tag', $scanned_tag, $replace ); -
wpcf7_form_tag_data_option
filterapply_filters( 'wpcf7_form_tag_data_option', null, $options, $args ); -
wpcf7_form_tag_date_option
filterapply_filters( 'wpcf7_form_tag_date_option', null, array( $option_name => $option_value ) ); -
wpcf7_form_title_attr
filterapply_filters( 'wpcf7_form_title_attr', $options['html_title'] ); -
wpcf7_init
actiondo_action( 'wpcf7_init' ); -
wpcf7_is_date
filterapply_filters( 'wpcf7_is_date', $result, $text ); -
wpcf7_is_email
filterapply_filters( 'wpcf7_is_email', $result, $text ); -
wpcf7_is_number
filterapply_filters( 'wpcf7_is_number', $result, $text ); -
wpcf7_is_tel
filterapply_filters( 'wpcf7_is_tel', $result, $text ); -
wpcf7_is_time
filterapply_filters( 'wpcf7_is_time', $result, $text ); -
wpcf7_is_url
filterapply_filters( 'wpcf7_is_url', $result, $text ); -
wpcf7_load_css
filterapply_filters( 'wpcf7_load_css', WPCF7_LOAD_CSS ); -
wpcf7_load_js
filterapply_filters( 'wpcf7_load_js', WPCF7_LOAD_JS ); -
wpcf7_log_remote_request
filterapply_filters( 'wpcf7_log_remote_request', $log, $url, $request, $response ); -
wpcf7_mail_components
filterapply_filters( 'wpcf7_mail_components', $components, wpcf7_get_current_contact_form(), $this ); -
wpcf7_mail_failed
actiondo_action( 'wpcf7_mail_failed', $contact_form ); -
wpcf7_mail_html_body
filterapply_filters( 'wpcf7_mail_html_body', $body, $this ); -
wpcf7_mail_html_header
filterapply_filters( 'wpcf7_mail_html_header', '<!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"' . $lang_atts . '> <head> <title>' . esc_html( $this->get( 'subject', true ) ) . '</title> </head> <body> ', $this ); -
wpcf7_mail_sent
actiondo_action( 'wpcf7_mail_sent', $contact_form ); -
wpcf7_mail_tag_replaced
filterapply_filters( 'wpcf7_mail_tag_replaced', $replaced, $submitted, $html, $mail_tag ); -
apply_filters( "wpcf7_mail_tag_replaced_{$type}", $replaced, $submitted, $html, $mail_tag ); -
wpcf7_manage_custom_column
actiondo_action( 'wpcf7_manage_custom_column', $column_name, $item->id() ); -
wpcf7_map_meta_cap
filterapply_filters( 'wpcf7_map_meta_cap', $meta_caps ); -
wpcf7_messages
filterapply_filters( 'wpcf7_messages', $messages ); -
wpcf7_posted_data
filterapply_filters( 'wpcf7_posted_data', $posted_data ); -
apply_filters( "wpcf7_posted_data_{$tag->type}", $value, $value_orig, $tag ); -
apply_filters( 'wpcf7_pre_construct_contact_form_properties', $builtin_properties, $this ); -
wpcf7_recaptcha_actions
filterapply_filters( 'wpcf7_recaptcha_actions', array( 'homepage' => 'homepage', 'contactform' => 'contactform', ) ); -
wpcf7_recaptcha_secret
filterapply_filters( 'wpcf7_recaptcha_secret', $secret ); -
wpcf7_recaptcha_sitekey
filterapply_filters( 'wpcf7_recaptcha_sitekey', $sitekey ); -
wpcf7_recaptcha_threshold
filterapply_filters( 'wpcf7_recaptcha_threshold', 0.50 ); -
apply_filters( 'wpcf7_recaptcha_verify_response', $is_human, $response_body ); -
wpcf7_refill_response
filterapply_filters( 'wpcf7_refill_response', array() ); -
wpcf7_remote_ip_addr
filterapply_filters( 'wpcf7_remote_ip_addr', $ip_addr ); -
wpcf7_save_contact_form
actiondo_action( 'wpcf7_save_contact_form', $contact_form, $data, $context ); -
apply_filters( 'wpcf7_sendinblue_collect_parameters', $params ); -
apply_filters( 'wpcf7_sendinblue_contact_parameters', array( 'email' => $attributes['EMAIL'], 'attributes' => (object) $attributes, 'listIds' => (array) $prop['contact_lists'], 'updateEnabled' => false, ) ); -
apply_filters( 'wpcf7_sendinblue_doi_email_callback', 'wpcf7_sendinblue_doi_default_email_callback' ); -
apply_filters( 'wpcf7_sendinblue_doi_optin_callback', 'wpcf7_sendinblue_doi_default_optin_callback' ); -
apply_filters( 'wpcf7_sendinblue_email_parameters', array( 'templateId' => absint( $prop['email_template'] ), 'to' => array( array( 'name' => $email_to_name, 'email' => $attributes['EMAIL'], ), ), 'params' => (object) $attributes, 'tags' => array( 'Contact Form 7' ), ) ); -
wpcf7_shortcode_callback
actiondo_action( 'wpcf7_shortcode_callback', $contact_form, $atts ); -
wpcf7_skip_mail
filterapply_filters( 'wpcf7_skip_mail', $this->skip_mail, $contact_form ); -
wpcf7_skip_spam_check
filterapply_filters( 'wpcf7_skip_spam_check', $this->skip_spam_check, $this ); -
wpcf7_spam
filterapply_filters( 'wpcf7_spam', $spam, $this ); -
apply_filters( 'wpcf7_stripe_payment_intent_parameters', $pi_params ); -
apply_filters( 'wpcf7_submission_has_disallowed_words', $word, $submission ); -
wpcf7_submission_result
filterapply_filters( 'wpcf7_submission_result', $result, $this ); -
wpcf7_submit
actiondo_action( 'wpcf7_submit', $this, $result ); -
apply_filters( 'wpcf7_subscribers_only_notice', $notice, $this ); -
wpcf7_support_html5_fallback
filterapply_filters( 'wpcf7_support_html5_fallback', false ); -
wpcf7_swv_available_rules
filterapply_filters( 'wpcf7_swv_available_rules', $rules ); -
wpcf7_swv_create_schema
actiondo_action( 'wpcf7_swv_create_schema', $schema, $this ); -
wpcf7_turnstile_secret
filterapply_filters( 'wpcf7_turnstile_secret', $secret ); -
wpcf7_turnstile_sitekey
filterapply_filters( 'wpcf7_turnstile_sitekey', $sitekey ); -
wpcf7_update_option
actiondo_action( 'wpcf7_update_option', $name, $value, $old_option ); -
wpcf7_upgrade
actiondo_action( 'wpcf7_upgrade', $new_ver, $old_ver ); -
wpcf7_upload_dir
filterapply_filters( 'wpcf7_upload_dir', array( 'dir' => $uploads['basedir'], 'url' => $uploads['baseurl'], ) ); -
wpcf7_upload_file_name
filterapply_filters( 'wpcf7_upload_file_name', $filename, $name, $options ); -
apply_filters( 'wpcf7_use_really_simple_captcha', WPCF7_USE_REALLY_SIMPLE_CAPTCHA ); -
wpcf7_validate
filterapply_filters( 'wpcf7_validate', $result, $tags ); -
wpcf7_validate_{$tag->type}
filterapply_filters( "wpcf7_validate_{$tag->type}", $result, $tag, array( 'uploaded_files' => $uploaded_files, ) ); -
wpcf7_validate_{$type}
filterapply_filters( "wpcf7_validate_{$type}", $result, $tag ); -
wpcf7_validate_configuration
filterapply_filters( 'wpcf7_validate_configuration', WPCF7_VALIDATE_CONFIGURATION ); -
wpcf7_validation_error
filterapply_filters( 'wpcf7_validation_error', $error, $name, $this ); -
wpcf7_verify_nonce
filterapply_filters( 'wpcf7_verify_nonce', $is_active, $this );
Generated from Contact Form 7's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: