Support forum for my wordpress plugins. Here you can get support for Plugin Organizer, Honeypot Toolkit, and Flexible Captcha.

Please or Register to create posts and topics.

How to Remove Captcha from few Contact us form 7.

I have multiple forms on the page on the right side form I have Captcha, but in the left side form there is no Captcha or I have not added any Captcha shortcode on the left side form but on submitting still validate

Captcha in form &  give me an error.

I mean the Captcha validate if we add the shortcode in the form  & the Captcha will not insert on each form automatically & validate. 

Please review the attached image please review & help me to fix this.

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();
});

jQuery('.wpcf7-form .FC_captcha_input_container').each(function() {
var oldHtml = jQuery(this).html();
jQuery(this).html('<span class="wpcf7-form-control-wrap FC_captcha_input">'+oldHtml+'</span>');
});
});
</script>
<?php
}

 

 

 

Uploaded files: