Support forum for my wordpress plugins. Here you can get support for Plugin Organizer, Honeypot Toolkit, and Flexible Captcha.
Captcha is not working with contact form 7
tyagisaurabh@8f53295a73878494e9bc8dd6c3c7104f
2 Posts
#1 · December 16, 2019, 5:53 am
Quote from tyagisaurabh on December 16, 2019, 5:53 amHi Support,
I am facing an issuo of one of my website
https://gbxdev.wpengine.com/contact-us/
I am typing correct catpcha it's still give me error
I have added below code also in function.php
add_filter( 'wpcf7_form_elements', 'custom_wpcf7_form_elements' );function custom_wpcf7_form_elements( $form ) {$form = do_shortcode( $form );return $form;}add_filter('wpcf7_validate', 'custom_wpcf7_validate');function custom_wpcf7_validate($result) {global $FlexibleCaptcha;if (!$FlexibleCaptcha->check_captcha_val()) {$captchaTag = new WPCF7_FormTag(array('type'=>'text', 'basetype'=>'text', 'name'=>'FC_captcha_input'));$result->invalidate($captchaTag, 'The entered text did not match the captcha image.');}return $result;}add_filter('wp_head', 'custom_add_contact_captcha_regenerate');function custom_add_contact_captcha_regenerate($result) {?><script type="text/javascript" language="javascript">jQuery(function() {jQuery('.wpcf7-form').on('ajaxComplete', function() {jQuery('.wpcf7-form .FC_image_refresh').click();});var oldHtml = jQuery('.wpcf7-form .FC_captcha_input_container').html();jQuery('.wpcf7-form .FC_captcha_input_container').html('<span class="wpcf7-form-control-wrap FC_captcha_input">'+oldHtml+'</span>');});</script><?php}
Hi Support,
I am facing an issuo of one of my website
https://gbxdev.wpengine.com/contact-us/
I am typing correct catpcha it's still give me error
I have added below code also in function.php
add_filter( 'wpcf7_form_elements', 'custom_wpcf7_form_elements' );
function custom_wpcf7_form_elements( $form ) {
$form = do_shortcode( $form );
return $form;
}
add_filter('wpcf7_validate', 'custom_wpcf7_validate');
function custom_wpcf7_validate($result) {
global $FlexibleCaptcha;
if (!$FlexibleCaptcha->check_captcha_val()) {
$captchaTag = new WPCF7_FormTag(array('type'=>'text', 'basetype'=>'text', 'name'=>'FC_captcha_input'));
$result->invalidate($captchaTag, 'The entered text did not match the captcha image.');
}
return $result;
}
add_filter('wp_head', 'custom_add_contact_captcha_regenerate');
function custom_add_contact_captcha_regenerate($result) {
?>
<script type="text/javascript" language="javascript">
jQuery(function() {
jQuery('.wpcf7-form').on('ajaxComplete', function() {
jQuery('.wpcf7-form .FC_image_refresh').click();
});
var oldHtml = jQuery('.wpcf7-form .FC_captcha_input_container').html();
jQuery('.wpcf7-form .FC_captcha_input_container').html('<span class="wpcf7-form-control-wrap FC_captcha_input">'+oldHtml+'</span>');
});
</script>
<?php
}
Uploaded files:
Click for thumbs down.0Click for thumbs up.0
tyagisaurabh@8f53295a73878494e9bc8dd6c3c7104f
2 Posts
#2 · December 16, 2019, 9:22 pm
Quote from tyagisaurabh on December 16, 2019, 9:22 pmHi Support ,
Please help me to resolve it
Hi Support ,
Please help me to resolve it
Click for thumbs down.0Click for thumbs up.0