HTML Forms 1.7.2 has 20 actions and 26 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 HTML Forms fires an action
add_action( 'hf_form_error', function( $error_code, $form, $data ) {
// Your code runs here.
}, 10, 3 );
// Change a value HTML Forms is about to use
add_filter( 'hf_available_form_actions', function( $actions ) {
// Change $actions here.
return $actions;
}, 10, 1 );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
-
hf_admin_action_{$action}
action/** * Allows you to hook into requests containing `_hf_admin_action` => action * name. */ do_action( "hf_admin_action_{$action}" ); -
hf_available_form_actions
filter/** * Filters the available form actions */ apply_filters( 'hf_available_form_actions', $actions ); -
/** * General purpose hook after all form actions have been processed for this * specific form. The dynamic portion of the hook refers to the form slug. */ do_action( "hf_form_{$form->slug}_success", $submission, $form ); -
hf_form_element_action_attr
filter/** * Filters the action attribute for this form. */ apply_filters( 'hf_form_element_action_attr', null, $form ); -
hf_form_element_class_attr
filter/** * Filters the CSS classes to be added to this form's class attribute. */ apply_filters( 'hf_form_element_class_attr', '', $form ); -
/** * Filters the data attributes to be added to the form attribute. */ apply_filters( 'hf_form_element_data_attributes', $attributes, $form ); -
hf_form_error
action/** * General purpose hook for when a form error occurred */ do_action( 'hf_form_error', $error_code, $form, $data ); -
hf_form_html
filter/** * Filters the resulting HTML for this form. */ apply_filters( 'hf_form_html', $html, $form ); -
hf_form_success
action/** * General purpose hook after all form actions have been processed. */ do_action( 'hf_form_success', $submission, $form ); -
hf_ignored_field_names
filter/** * Filters the field names that should be ignored on the Submission object. * Fields starting with an underscore (_) are ignored by default. */ apply_filters( 'hf_ignored_field_names', array() ); -
/** * Output setting fields for a registered action */ do_action( "hf_output_form_action_{$action_settings['type']}_settings", $action_settings, $index++ ); -
/** * Runs after the form settings are printed. */ do_action( 'hf_output_form_settings_submissions', $form ); -
hf_process_form
action/** * General purpose hook that runs before all form actions, so we can still * modify the submission object that is passed to actions. */ do_action( 'hf_process_form', $form, $submission ); -
/** * Processes the specified form action and passes related data. */ do_action( "hf_process_form_action_{$action_settings['type']}", $action_settings, $submission, $form ); -
/** * Deprecated action hook. Use the above action (hf_output_form_action_...) * instead. */ do_action( "hf_render_form_action_{$action_settings['type']}_settings", $action_settings, $index++ ); -
hf_settings
filter/** * Filters the global HTML Forms hf_settings */ apply_filters( 'hf_settings', $settings ); -
hf_template_tags
filter/** * Filters the available tags in HTML Forms templates, like * {{user.user_email}}. */ apply_filters( 'hf_template_tags', $tags ); -
hf_validate_form
filter/** * This filter allows you to perform your own form validation. */ apply_filters( 'hf_validate_form', $error_code, $form, $data ); -
/** * This filter allows you to perform your own form validation. The dynamic * portion of the hook refers to the form slug. */ apply_filters( "hf_validate_form_{$form->slug}", $error_code, $form, $data ); -
hf_action_email_from
filterapply_filters( 'hf_action_email_from', hf_replace_data_variables( $settings['from'], $submission, $sanitize_header_value ), $submission ); -
hf_action_email_message
filterapply_filters( 'hf_action_email_message', $message, $submission ); -
hf_action_email_subject
filterapply_filters( 'hf_action_email_subject', $subject, $submission ); -
hf_action_email_to
filterapply_filters( 'hf_action_email_to', $to, $submission ); -
apply_filters( 'hf_admin_form_submissions_bulk_actions', array( 'bulk_delete_submissions' => __( 'Delete Permanently' ), ) ); -
do_action( 'hf_admin_form_submissions_detail', $submission ); -
do_action( 'hf_admin_form_submissions_table_output_column_header', $field, $column ); -
do_action( 'hf_admin_form_submissions_table_output_row_actions', $s ); -
do_action( 'hf_admin_output_form_messages', $form ); -
do_action( 'hf_admin_output_form_messages_submissions', $form ); -
do_action( "hf_admin_output_form_tab_{$tab}", $form ); -
do_action( 'hf_admin_output_google_recaptcha_v3_settings' ); -
do_action( 'hf_admin_output_misc_settings' ); -
hf_admin_output_settings
actiondo_action( 'hf_admin_output_settings' ); -
hf_admin_tabs
filterapply_filters( 'hf_admin_tabs', $tabs, $form ); -
apply_filters( 'hf_file_upload_use_direct_links', false ); -
hf_form_default_messages
filterapply_filters( 'hf_form_default_messages', $default_messages ); -
hf_form_default_settings
filterapply_filters( 'hf_form_default_settings', $default_settings ); -
hf_form_markup
filterapply_filters( 'hf_form_markup', $this->markup, $this ); -
hf_form_message_{$code}
filterapply_filters( "hf_form_message_{$code}", $message, $form ); -
hf_form_response
filterapply_filters( 'hf_form_response', $response, $form, $data ); -
apply_filters( 'hf_mailchimp_action_merge_fields', $merge_fields, $submission, $form ); -
apply_filters( 'hf_mailchimp_action_subscriber_data', $mailchimp_data, $submission, $form ); -
do_action( "hf_output_form_action_{$type}_settings", array(), '$index' ); -
hf_output_form_settings
actiondo_action( 'hf_output_form_settings', $form ); -
hf_recaptcha_min_score
filterapply_filters( 'hf_recaptcha_min_score', 0.5, $form ); -
apply_filters( 'hf_validate_form_request_size', true );
Generated from HTML Forms'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: