Extension

Developer
Supported

reCAPTCHA v2

ExpressionEngine 1.x, ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5

Back to this add-on's main page
View Other Add-ons From Denik

     

You must be logged in to post.

reCaptcha shown, but not enforced in Freeform / EE5

Bug Report

MH Webdesign
MH Webdesign

Hi,

I have this add-on installed on EE5.1.2 with Freeform Lite 1.8.1. Added site/secret keys and the {captcha} variable inside the form tags. The recaptcha is showing now, but it is not being enforced as a required field. The form get’s submitted, even when I am not checking the recaptcha box.

Also tested when not simultaneously logged in as administrator.

MH Webdesign
# 1
MH Webdesign

Recaptcha is added in the <head> and scripts throws no errors.

Denik
# 2
Developer
Denik

Hello,

Not sure that is bug… Maybe this is a necessary feature (for form can’t submitted before “recaptcha” be solved)?

At now, you can apply some standart solution from stackoverflow, for example:

<script>
window.onload = function() {
    
var $recaptcha document.querySelector('#g-recaptcha-response');

    if(
$recaptcha{
        $recaptcha
.setAttribute("required""required");
    
}
}
;
</script>
<style>
#g-recaptcha-response {
    
displayblock !important;
    
positionabsolute;
    
margin: -78px 0 0 0 !important;
    
width302px !important;
    
height76px !important;
    
z-index: -999999;
    
opacity0;
}
</style

...I will include simpler solution in the next release, okay? :-)

MH Webdesign
# 3
MH Webdesign

Hi Denik,

Thank you for your reply. I think that validation is required to be able to post a form no? If you do not tick the box, then you need to get an error and you can not post the form? Otherwise, there is no point in having the recaptcha.

Just to be clear, the form gets sent now. The recaptcha is shown, but it’s not doing anything to prevent spam messages. Even if I do not tick the box, the forms gets sucessfully sent.

MH Webdesign
# 4
MH Webdesign

Hi Denik, do you have any tips? I really like to have server side validation on the forms.

Denik
# 5
Developer
Denik

Hi,
oh… I’m sorry :-)

I think its made a conflict with some other addon… so I’ll need to see it myself.
Can you send super admin and FTP credentionals to email hi at eecoding dot com ?

MH Webdesign
# 6
MH Webdesign

Hi Denik, I’ve provided you with the details per mail.