Code Monkey home page Code Monkey logo

contact-form-7-hooks's Introduction

Contact Form 7 Hooks

Here you can find some Contact Form 7 actions and filters (hooks) available for use. The last used version is 4.2.1.

Filters

  • wpcf7_contact_form_default_pack
/**
 * Description
 *
 * @param $contact_form
 * @param $args
 * @return $contact_form
 */
add_filter('wpcf7_contact_form_default_pack', function($contact_form, $args) {
    return $contact_form;
});
  • wpcf7_contact_form_properties
/**
 * Description
 *
 * @param $properties
 * @param $cf7
 * @return $properties
 */
add_filter('wpcf7_contact_form_properties', function($properties, $cf7) {
    return $properties;
});
  • wpcf7_form_action_url
/**
 * Used to change the form action URL
 *
 * @param $url the current URL
 * @return string The new URL you want
 */
add_filter('wpcf7_form_action_url', function($url) {
    return $url;
});
  • wpcf7_form_id_attr
/**
 * Change de form HTML id value
 *
 * @param $html_id The current id value
 * @return string The new id
 */
add_filter('wpcf7_form_id_attr', function($html_id) {
    return $html_id;
});
  • wpcf7_form_name_attr
/**
 * Change de form HTML name
 *
 * @param $html_name The actual name
 * @return string The new name
 */
add_filter('wpcf7_form_name_attr', function($html_name) {
    return $html_name;
});
  • wpcf7_form_class_attr
/**
 * Change de form class name
 *
 * @param $html_class The actual class name
 * @return string The new class name
 */
add_filter('wpcf7_form_class_attr', function($html_class) {
    return $html_class;
});
  • wpcf7_form_enctype
/**
 * Change de form enctype tag
 *
 * @param $html_enctype An empty string
 * @return string The new enctype tag value
 */
add_filter('wpcf7_form_enctype', function($html_enctype = '') {
    return $html_enctype;
});
  • wpcf7_form_novalidate
/**
 * Description
 *
 * @param $support_html5 The result of wpcf7_support_html5() function call
 * @return @novalidate
 */
add_filter('wpcf7_form_novalidate', function($support_html5) {
    return null;
});
  • wpcf7_form_response_output
/**
 * Filter the form response output
 *
 * @param $output 
 * @param $class 
 * @param $content 
 * @param $cf7 
 * @return @output
 */
add_filter('wpcf7_form_response_output', function($output, $class, $content, $cf7) {
    return $output;
});
  • wpcf7_validation_error
/**
 * Return the validation HTML code message for a field error
 *
 * @param $error The HTML like '<span role="alert" class="wpcf7-not-valid-tip">%s</span>
 * @param $name The field name
 * @param $cf7 The CF7 object
 * @return @error The new HTML error
 */
add_filter('wpcf7_validation_error', function($error, $name, $cf7) {
    return $error;
});

contact-form-7-hooks's People

Contributors

jgrossi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.