Smart Grid-Layout Design for Contact Form 7 4.19.0 has 31 actions and 61 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 Smart Grid-Layout Design for Contact Form 7 fires an action
add_action( 'cf7sg_register_dynamic_lists', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Smart Grid-Layout Design for Contact Form 7 is about to use
add_filter( 'cf7sg_dynamic_dropdown_option_attributes', function( $value, $term, $name, $cf7_key ) {
// Change $value here.
return $value;
}, 10, 4 );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
-
/** * NB @since 4.10.0 abstract out dynamic lists */ do_action( 'cf7sg_register_dynamic_lists' ); -
/** * Filter the value inserted in the mail tag. */ apply_filters( "cf7sg_mailtag_{$mail_tag->field_name()}", $replaced, $submitted_data, $cf7form_key ); -
/** * Filter dropdown options attributes. */ apply_filters( "cf7sg_{$this->tag_id}_options_attributes", $filter_attributes, $post, $tag, $cf7_key ); -
/** * Filter dropdown options attributes. */ apply_filters_deprecated( 'cf7sg_dynamic_dropdown_option_attributes', array( array(), $term, $tag->name, $cf7_key ), '4.11.0', "cf7sg_{$this->tag_id}_options_attributes" ); -
/** * Filter post query for dynamic dropdown options. */ apply_filters_deprecated( 'cf7sg_dynamic_dropdown_post_query', array( $args, $tag->name, $cf7_key ), '4.11.0', 'cf7sg_dynamic_list_post_query' ); -
/** * NB @since 3.2.1 use cloudflare for live sites */ apply_filters( 'cf7sg_use_local_select2', false ); -
/** * Register a [dynamic_display] shortcode with CF7. */ apply_filters( "cf7sg_{$this->tag_id}_html_field", '', $attributes, $options, $other_attrs, $selected ); -
/** * Filter dynamic dropdown default empty value label. */ apply_filters_deprecated( 'cf7sg_dynamic_dropdown_default_value', array( null, $tag->name, $cf7_key ), '4.11.0', "cf7sg_{$this->tag_id}_default_value" ); -
/** * Allow filtering of options populated by posts or taxonomies. */ apply_filters_deprecated( 'cf7sg_dynamic_dropdown_filter_options', array( $options, $tag->name, $cf7_key), '4.11.0' ); -
/** * Filter custom otions from tag enabled select2 dynamic-dropdown fields where * the source of options come from a filter. Filter is fired when values are * submitted. Return updated values if any are custom values so that * saved/draft submissions will reflect the correct value saved in the DB, */ apply_filters( 'cf7sg_dynamic_dropdown_filter_select2_submission', $values, $field_name, $submitted_data, $cf7_key ); -
/** * Filter custom options from tag enabled select2 dynamic-dropdown fields where * the source of options come from post titles. Filter is fired when a new * value is submitted. This plugin does not take any further action, ie no post * of $post_type will be created. It is upto you to do so and return the slug * of the newly created post. */ apply_filters( 'cf7sg_dynamic_dropdown_new_post', $post_name, $field_name, $title, $post_type, $args, $submitted_data, $cf7_key ); -
/** * Filter custom options from tag enabled select2 dynamic-dropdown fields where * the source of options come from taxonomy terms. Filter is fired when a new * value is submitted. The pluign inserts a new term by default as per * submitted value. */ apply_filters( 'cf7sg_dynamic_dropdown_new_term', $term, $field_name, $taxonomy, $submitted_data, $cf7_key ); -
/** * NB @since 4.4.0 set max-width of forms dynamically */ apply_filters( 'cf7sg_max_form_width', 940, $cf7_key ); -
/** * Filter to add custom pointers for user iterface. */ apply_filters( "cf7sg_plugin_pointers-{$screen->id}", array(), $dismissed_pointers ); -
/** * NB @since 4.8.1 preserve cf7 data schema for some plugins */ apply_filters( 'cf7sg_preserve_cf7_data_schema', false ); -
/** * Once data is valid fire action to expose final submitted data. */ do_action( 'cf7sg_valid_form_submission', $submission, $form_key, $_POST['_wpcf7'] ); -
/** * filter to validate the entire submission and check interdependency of * fields. The $validation array are error messages coming from the default * CF7 validation process. However, you can unset those messages if your * cross-data validation logic demands it, or you can add additional errors to * fields that have passed the default validation. For repeat fields, you need * to follow the same array contru... */ apply_filters( 'cf7sg_validate_submission', $validation, $submission, $form_key, $_POST['_wpcf7'] ); -
/** * filter to add/remove panels from the cf7 post editor */ apply_filters( 'wpcf7_editor_panels', $panels ); -
apply_filters( 'cf7sg_annotate_mail_attach_grid_files', '', $name, $file_name, $tab, $row, $_POST['_wpcf7_key'] ); -
apply_filters( "wpcf7_validate_{$tag['type']}", new WPCF7_Validation(), $tag ); -
apply_filters( "cf7sg_{$this->tag_id}_option_label", $label, $post, $tag, $cf7_key ); -
apply_filters_deprecated( 'cf7sg_dynamic_dropdown_option_label', array( $label, $post, $tag->name, $cf7_key ), '4.11.0', "cf7sg_{$this->tag_id}_option_label" ); -
apply_filters( 'cf7sg_dynamic_list_post_query', $args, $tag->name, $cf7_key ); -
apply_filters_deprecated( 'cf7sg_mailtag_grid_fields', array( '', $mail_tag->field_name(), $submitted, $cf7form_key, false ), '4.6.2', 'cf7sg_mailtag_{$field_name}', __( 'this filter is no longer available', 'cf7-grid-layout' ) ); -
do_action( 'smart_grid_enqueue_scripts', $cf7_key, $attr, $class ); -
apply_filters( "wpcf7_validate_{$sg_field_tag->type}", $result, $sg_field_tag, array( 'uploaded_files' => isset( $this->file_wp_errors[ $sg_field_tag['name'] ] ) ? $this->file_wp_errors[ $sg_field_tag['name'] ] : $row_value, ) ); -
do_action( 'admin_enqueue_scripts', $page_hook ); -
apply_filters( 'cf7_form_shortcode_form_id', $id, $atts ); -
apply_filters_deprecated( 'cf7_smart_grid_form_id', array( $css_id, $attr ), '4.6.0', '', __( 'this filter is no longer available', 'cf7-grid-layout' ) ); -
apply_filters( "cf7sg_{$this->tag_id}_attributes", $attributes, $tag, $cf7_key ); -
apply_filters( "cf7sg_{$this->tag_id}_default_value", $default_label, $tag, $cf7_key ); -
apply_filters( "cf7sg_{$this->tag_id}_image_size", 'thumbnail', $post, $tag, $cf7_key ); -
apply_filters( "cf7sg_{$this->tag_id}_include_post_terms_as_class", true, $tag, $cf7_key ); -
apply_filters( "cf7sg_{$this->tag_id}_taxonomy_query", $taxonomy_query, $branch, $tag, $cf7_key, $branch ); -
apply_filters( 'cf7sg_admin_css_editor_theme', '' ); -
apply_filters( 'cf7sg_admin_editor_theme', '' ); -
do_action( 'cf7sg_admin_form_editor_jstags_last_item' ); -
do_action( 'cf7sg_admin_form_editor_jstags_other_items' ); -
apply_filters( 'cf7sg_admin_js_editor_theme', '' ); -
apply_filters( "cf7sg_custom_{$this->tag_id}", array(), $tag, $cf7_key ); -
do_action( 'cf7sg_default_custom_css_template', $cf7_key ); -
do_action( 'cf7sg_default_custom_js_template', $cf7_key ); -
do_action( 'cf7sg_display_dynamic_list_tag_manager', $this->tag_id, $this, $contact_form, $args ); -
apply_filters( 'cf7sg_duplicate_form_properties', Cf7_Grid_Layout_Admin::METAKEYS ); -
apply_filters_deprecated( 'cf7sg_dynamic_dropdown_attributes', array(array(), $tag->name, $cf7_key), '4.11.0', "cf7sg_{$this->tag_id}_attributes" ); -
apply_filters_deprecated( 'cf7sg_dynamic_dropdown_custom_options', array( '', $tag->name, $cf7_key ), '4.11.0', "cf7sg_custom_{$this->tag_id}" ); -
apply_filters_deprecated( 'cf7sg_dynamic_dropdown_taxonomy_query', array( $taxonomy_query, $tag->name, $cf7_key ), '4.11.0', "cf7sg_{$this->tag_id}_taxonomy_query" ); -
do_action( 'cf7sg_dynamic_tag_manager_custom_source', $tag_id ); -
do_action( 'cf7sg_dynamic_tag_manager_end', $tag_id ); -
do_action( 'cf7sg_dynamic_tag_manager_post_source', $tag_id ); -
do_action( 'cf7sg_dynamic_tag_manager_taxonomy_source', $tag_id ); -
do_action( 'cf7sg_enqueue_admin_editor_scripts' ); -
do_action( 'cf7sg_enqueue_admin_editor_styles' ); -
do_action( 'cf7sg_enqueue_admin_table_scripts' ); -
do_action( 'cf7sg_enqueue_admin_table_styles' ); -
do_action( "cf7sg_enqueue_custom_script-{$cf7_key}", $cf7_key . '-js' ); -
apply_filters( 'cf7sg_form_redirect_cached_data', $data, $_POST['_wpcf7_key'], $form->id() ); -
apply_filters( 'cf7sg_grid_ui', true, $post->post_name ); -
apply_filters( 'cf7sg_hybrid_dynamic_checkbox_default_value', '', $attrs['name'] ); -
apply_filters( 'cf7sg_kses_allowed_html', $allowed_tags, $cf7_key ); -
apply_filters( "cf7sg_mailtag_{$tag->basetype}", $replaced, $mail_tag->field_name(), $submitted_data, $cf7form_key ); -
apply_filters( 'cf7sg_new_cf7_form_template_arguments', array() ); -
apply_filters( 'cf7sg_post_cf7_field_html', '<p class="info-tip"></p></div>', $post->post_name ); -
apply_filters( 'cf7sg_pre_cf7_field_html', '<div class="field"><label for=""></label>', $post->post_name ); -
apply_filters( 'cf7sg_prefill_form_fields', $prefill, $cf7_key ); -
apply_filters( 'cf7sg_preview_form_fields', array(), $cf7_key ); -
apply_filters( 'cf7sg_preview_prefill', true, $a['cf7key'] ); -
apply_filters( 'cf7sg_redirect_on_success', '', $data, $cf7key ); -
apply_filters( 'cf7sg_remove_table_row_labels', true, $cf7_key ); -
apply_filters( 'cf7sg_required_cf7_field_html', '<em>*</em>', $post->post_name ); -
apply_filters( 'cf7sg_responsive_width', 480, $cf7_key ); -
apply_filters( 'cf7sg_save_dynamic_list_form_classes', array(), $tag, $form_id ); -
do_action( 'cf7sg_save_post', $post_id, $post, $update ); -
apply_filters( 'cf7sg_slider_auto_scroll', true, $cf7_key ); -
do_action( 'cf7sg_subform_uddate', $cf7_id, $cf7_form, $attr ); -
apply_filters( 'cf7sg_submission_response', $message, $status, $data, $cf7key ); -
apply_filters_deprecated( 'cf7sg_submission_success_message', array( $results['message'], $data, $cf7key ), '', __( 'this filter is no longer available', 'cf7-grid-layout' ) ); -
apply_filters( 'cf7sg_tutorial_panels', array() ); -
do_action( 'cf7sg_ui_grid_helper_hooks' ); -
do_action( 'cf7sg_ui_grid_js_helper_hooks' ); -
do_action( 'load-contact_page_wpcf7-new' ); -
do_action( 'load-toplevel_page_wpcf7' ); -
do_action_deprecated( 'smart_grid_register_custom_script', array( $cf7_key ), '4.6.0', 'cf7sg_enqueue_custom_script-$form_key', __( 'deprecated action hook', 'cf7-grid-layout' ) ); -
do_action( 'smart_grid_register_scripts', $airplane, $min, $resources, $cf7key, $cf7id ); -
do_action( 'smart_grid_register_styles', $airplane, $min, $resources, $cf7key, $cf7id ); -
do_action( 'wpcf7_admin_misc_pub_section', $post->ID ); -
do_action( 'wpcf7_admin_notices', 'wpcf7', wpcf7_current_action(), null ); -
do_action( 'wpcf7_admin_warnings', 'wpcf7', wpcf7_current_action(), null ); -
apply_filters( "wpcf7_validate_{$tag->type}", $result, $tag, array( 'uploaded_files' => isset( $this->file_wp_errors[ $tag['name'] ] ) ? $this->file_wp_errors[ $tag['name'] ] : $data[ $tag['name'] ], ) ); -
apply_filters( "wpcf7_validate_{$type}", $result, $tag );
Generated from Smart Grid-Layout Design for Contact Form 7's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: