Support forum for my wordpress plugins. Here you can get support for Plugin Organizer, Honeypot Toolkit, and Flexible Captcha.
Support forum for my wordpress plugins. Here you can get support for Plugin Organizer, Honeypot Toolkit, and Flexible Captcha.
Quote from sumanchambyal on May 6, 2020, 10:43 amcan you please let me know how do that
add_filter('wpcf7_validate', 'custom_wpcf7_validate');
function custom_wpcf7_validate($result) {
global $FlexibleCaptcha;if ('3910' === event.detail.contactFormId) {
} else if (!$FlexibleCaptcha->check_captcha_val()){
$captchaTag = new WPCF7_FormTag(array('type' => 'text', 'basetype' => 'text', 'name' => 'FC_captcha_input'));
if (empty($_POST['FC_captcha_input'])) {
$result->invalidate($captchaTag, 'Required');
} else {
$result->invalidate($captchaTag, 'Text did not match');
}
}
return $result;}
can you please let me know how do that
add_filter('wpcf7_validate', 'custom_wpcf7_validate');
function custom_wpcf7_validate($result) {
global $FlexibleCaptcha;
if ('3910' === event.detail.contactFormId) {
} else if (!$FlexibleCaptcha->check_captcha_val()){
$captchaTag = new WPCF7_FormTag(array('type' => 'text', 'basetype' => 'text', 'name' => 'FC_captcha_input'));
if (empty($_POST['FC_captcha_input'])) {
$result->invalidate($captchaTag, 'Required');
} else {
$result->invalidate($captchaTag, 'Text did not match');
}
}
return $result;
}