One form works fine + another form gets orange error (using recaptcha v.3)
-
I got the captcha v.3 working on my registration form for Beginner Driver Education form – i t submits successfully with all autoresponses etc., but the Senior Retesting/Road Test Prep/Private lesson (these buttons all load the same form) is producing the orange-border message of “Failed to send your message. Please try later or contact the administrator by another method.”
–> https://www.wardsdriving.ca/register-driving-school/I added this code to the bottom of my functions.php file:
add_action( ‘wp_footer’, ‘mycustom_wp_footer’ );
function mycustom_wp_footer() {
?>
<script type=”text/javascript”>
document.addEventListener( ‘wpcf7mailsent’, function( event ) {
ga( ‘send’, ‘event’, ‘Contact Form’, ‘submit’ );
}, false );
</script>
<?php
}add_filter( ‘wpcf7_recaptcha_verify_response’,
function( $is_human, $response_body ) {
$score = isset( $response_body[‘score’] ) ? $response_body[‘score’] : 0;
$threshold = 0.0;
$is_human = $threshold < $score;
return $is_human;
},
10, 2
);It fixed the beginner course registration form, but the ‘other course’ form is still getting the orange outline error message. I’ve changed my spam settings in the above code and in the Google Captcha plugin to 0.0. Contact Form 7 version is 5.1.1, WP version 5.0.2.
Why is one form hitting spam filters but not the other? They both have similar email message settings, subject line, etc. What does the “10, 2” mean in the above code–does the code I posted somehow need to be updated so that it apples to all contact forms instead of just one?
The page I need help with: [log in to see the link]
- The topic ‘One form works fine + another form gets orange error (using recaptcha v.3)’ is closed to new replies.