MetForm icon
Forms

MetForm hooks reference

  • By Roxnor
  • v4.3.5 New
  • Updated

MetForm 4.3.5 has 33 actions and 22 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.

functions.phpyour child theme
// Run your own code when MetForm fires an action
add_action( 'metform/entries/after_insert', function( $entry_id, $form_id, $form_data, $form_settings ) {
	// Your code runs here.
}, 10, 4 );

// Change a value MetForm is about to use
add_filter( 'metform_form_builder_advanced_control_groups', function( $groups, $block_type, $exclude ) {
	// Change $groups here.
	return $groups;
}, 10, 3 );

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

  • core/form-builder/advanced/controls.php line 75
    /**
     * Filters the Advanced-tab control groups of a block.
     */
    apply_filters( 'metform_form_builder_advanced_control_groups', $groups, $block_type, $exclude );
  • core/forms/template-library/remote-api.php line 74
    /**
     * Filters the template-library endpoint URL.
     */
    apply_filters( 'metform_template_library_api_url', self::API_URL );
  • core/forms/template-library/remote-api.php line 127
    /**
     * Filters the API key sent to the template library.
     */
    apply_filters( 'metform_template_library_key', (string) $key );
  • core/entries/action.php line 1533
    /**
     * A filter to allow the htaccess rules
     */
    apply_filters( 'metform_upload_root_htaccess_rules', $rules );
  • core/entries/action.php line 1105
    /**
     * Fires after an entry and its form data are saved.
     */
    do_action( 'metform/entries/after_insert', $this->entry_id, $form_id, $this->form_data, $form_settings );
  • core/entries/action.php line 346
    /**
     * Lets an add-on send the submission to a third-party service. Runs before the
     * entry is stored, so $context['entry_id'] is not set yet and
     * $context['form_data'] is the submitted data as received. Callbacks report a
     * failure on $response (status, failure_type, error).
     */
    do_action( 'metform/entries/submit/integrations', $this->response, $this->get_hook_context($form_data, $form_data) );
  • core/entries/action.php line 766
    /**
     * Lets an add-on notify the submitter, for example with a confirmation email.
     * $context['form_data'] is the sanitised data that was stored. Callbacks
     * report a failure on $response (status, failure_type, error).
     */
    do_action( 'metform/entries/submit/notify_user', $this->response, $this->get_hook_context($this->form_data, $form_data) );
  • core/entries/action.php line 289
    /**
     * Lets an add-on block the submission before anything is stored. Return a
     * WP_Error to block it: its code becomes the response failure_type and its
     * message the error shown to the visitor.
     */
    apply_filters( 'metform/entries/submit/pre_check', null, $form_id, $form_data, $this->form_settings );
  • core/form-builder/block-manifest.php line 77
    /**
     * Filters the list of Form Builder block instances to register.
     */
    apply_filters( 'metform/form_builder/blocks', $blocks );
  • core/form-builder/editor/canvas.php line 241
    /**
     * Fires after canvas runtime assets are enqueued.
     */
    do_action( 'metform/form_builder/canvas/enqueue_scripts', $post_id );
  • utils/form-template.php line 111
    /**
     * Filters whether a widget inside a MetForm form may emit template bindings.
     */
    apply_filters( 'metform/form_template/trusted_widget', $trusted, $widget );
  • utils/util.php line 739
    /**
     * Extra attributes for the form wrapper, as [ name => value ]. MetForm Pro
     * uses it for data-stop-vertical-effect and data-views-endpoint.
     */
    apply_filters( 'metform/form/wrapper_attributes', [], $form_id, $form_settings );
  • core/forms/hooks.php line 130
    /**
     * URL of the CSV export for this form. MetForm Pro provides it; without one, a
     * "Pro" placeholder is shown instead.
     */
    apply_filters( 'metform/forms/list/csv_export_url', '', $post_id );
  • core/form-builder/icons/custom-icon-upload.php line 135
    /**
     * Filters the maximum allowed custom icon SVG file size, in bytes.
     */
    apply_filters( 'metform/icon/max_upload_size', 100 * KB_IN_BYTES );
  • core/form-builder/icons/icon-library.php line 563
    /**
     * Filters the icon library cache directory. Return '' to disable the
     * persistent cache.
     */
    apply_filters( 'metform/icons/cache_dir', $dir );
  • core/form-builder/icons/icon-library.php line 420
    /**
     * Filters the icon libraries MetForm can render.
     */
    apply_filters( 'metform/icons/libraries', array( self::DEFAULT_LIBRARY => array( 'label' => __( 'Font Awesome', 'metform' ), 'file' => METFORM_FREE_PATH . self::FONT_AWESOME_FILE, 'styles' => array( 'solid' => array( 'prefix' => 'fas', 'label' => __( 'Solid', 'metform' ), ), 'regular' => array( 'prefix' => 'far', 'label' => __( 'Regular', 'metform' ), ), 'brands' => array( 'prefix' => 'fab', 'label' => __( 'Brands', 'metform' ), ), ), ... );
  • core/entries/action.php line 1255 · used in 9 places
    apply_filters( 'active_plugins', get_option('active_plugins') );
  • core/entries/api.php line 78 · used in 3 places
    do_action( 'metform_submission_failed', intval($id), [], $context );
  • utils/pro-awareness/pro-awareness.php line 321
    do_action( "{$this->text_domain}/pro_awareness/after_grid_contents" );
  • utils/pro-awareness/pro-awareness.php line 224
    do_action( "{$this->text_domain}/pro_awareness/before_grid_contents" );
  • utils/emailkit/emailkit.php line 21
    do_action( 'edit_with_emailkit_loaded' );
  • core/integrations/onboard/views/layout-onboard.php line 37
    apply_filters( 'elementskit/admin/onboard_steps/list', $onboard_steps );
  • core/integrations/onboard/views/settings-sections/usersettings.php line 642
    do_action( 'elementskit/admin/sections/userdata' );
  • core/forms/views/modal-editor.php line 738
    do_action( 'get_automixy_settings_content' );
  • core/forms/views/modal-editor.php line 335
    do_action( 'get_metform_email_verification_settings' );
  • core/entries/action.php line 862
    do_action( 'met_form_email_verification', $this->entry_id, $this->form_data[$this->email_name], $this->form_settings );
  • core/entries/form-data.php line 367
    do_action( 'metform_after_entries_table_data', $form_id, $form_data, $map_data );
  • core/entries/action.php line 709
    do_action( 'metform_after_store_form_data', $form_id, $form_data, $this->form_settings, $attributes );
  • core/entries/action.php line 702
    do_action( 'metform_before_store_form_data', $form_id, $form_data, $this->form_settings, $attributes );
  • core/entries/action.php line 704
    apply_filters( 'metform_filter_before_store_form_data', $this->form_data, $form_id, $this->form_settings, $attributes );
  • core/forms/views/modal-editor.php line 1241
    do_action( 'metform_fluent_crm_editor_markup' );
  • core/admin/views/settings.php line 1425
    do_action( 'metform_settings_content' );
  • utils/render.php line 62
    do_action( "metform_settings_subtab_{$id}" );
  • utils/render.php line 74
    do_action( "metform_settings_subtab_content_{$id}" );
  • core/admin/views/settings.php line 180
    do_action( 'metform_settings_tab' );
  • core/forms/views/modal-editor.php line 933
    do_action( 'metform_sms_integration_editor_markup' );
  • core/form-builder/dynamic-css/responsive-value.php line 51
    apply_filters( 'metform_style_breakpoints', self::DEFAULT_BREAKPOINTS );
  • core/integrations/onboard/classes/ajax.php line 39
    do_action( 'metform/admin/after_save' );
  • metform.php line 49
    do_action( 'metform/after_load' );
  • metform.php line 47
    do_action( 'metform/before_load' );
  • plugin.php line 42
    apply_filters( 'metform/core/package_type', 'free' );
  • core/form-builder/editor/canvas.php line 63
    do_action( 'metform/form_builder/editor/enqueue_scripts', $post_id, $all_blocks );
  • core/form-builder/rendering/form-renderer.php line 63
    apply_filters( 'metform/form_builder/extra_wrapper_attributes', '', $form_id, $form_settings );
  • core/form-builder/rendering/frontend.php line 30
    do_action( 'metform/form_builder/frontend/enqueue_assets', $post_id );
  • core/form-builder/rendering/frontend.php line 31
    do_action( 'metform/form_builder/frontend/enqueue_scripts', $post_id );
  • core/form-builder/migrator/widget-mapper.php line 85
    apply_filters( 'metform/form_builder/migrate_widget', null, $widget_type, $settings, $node_id, $parent_id );
  • plugin.php line 518
    do_action( 'metform/onload/enqueue_scripts' );
  • widgets/manifest.php line 153
    apply_filters( 'metform/onload/input_widgets', $widget_list );
  • core/forms/views/modal-editor.php line 293
    do_action( 'mf_add_conditional_redirect_input' );
  • core/forms/views/modal-editor.php line 309
    do_action( 'mf_add_url_databypass_input' );
  • core/entries/action.php line 185
    apply_filters( 'mf_after_validation_check', ['is_valid' => $validate, 'form_data' => $form_data , 'file_data' => $file_data] );
  • core/forms/views/modal-editor.php line 117
    do_action( 'mf_form_settings_tab' );
  • core/forms/views/modal-editor.php line 1291
    do_action( 'mf_form_settings_tab_content' );
  • utils/render.php line 198
    do_action( "mf_push_tab_content_{$parent_id}" );
  • core/integrations/onboard/classes/auto-install-tracker.php line 58
    apply_filters( 'wpmet_onboard_status_map', self::ONBOARD_STATUS_MAP );

Generated from MetForm'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: