If you want to add custom validation for contact form 7 input fields than please write below code:
add_filter('wpcf7_validate_FIELDNAME','cf7_custom_form_validation', 10, 2); // wpcf7_validate_email or wpcf7_validate_email*
function cf7_custom_form_validation($result,$tag) {
/*
Here you can write your custom code for validation
*/
}
add_filter('wpcf7_validate_FIELDNAME','cf7_custom_form_validation', 10, 2); // wpcf7_validate_email or wpcf7_validate_email*
function cf7_custom_form_validation($result,$tag) {
/*
Here you can write your custom code for validation
*/
}
No comments:
Post a Comment