Have an Umbraco Form with a recaptcha2 control in it. It's set up correctly in that it communicates with Google and gives an output to grecaptcha.getResponse() when checked. Without being checked it allows the form to submit whether or not it's set as mandatory in the form set up. If the Umbraco Forms JS validation for it doesn't work out of the box, how do you hook this code into whatever Umbraco Forms is doing at submit to include it in the validation?
$('.getmoreinformation form').validate({
ignore: ".ignore",
rules: {
hiddenRecaptcha: {
required: function () {
if (grecaptcha.getResponse() == '') {
return true;
} else {
return false;
}
}
}
},
errorElement: "label",
errorPlacement: function (error, element) {
// Add the `help-block` class to the error element
error.addClass( "help-block" );
if (element.prop("type") === "checkbox") {
error.insertAfter(element.parent("label"));
} else {
error.insertAfter(element);
}
}
});
ReCaptcha2 validation in Umbraco Forms
umb 7.12.3 forms 7.0.4
Have an Umbraco Form with a recaptcha2 control in it. It's set up correctly in that it communicates with Google and gives an output to grecaptcha.getResponse() when checked. Without being checked it allows the form to submit whether or not it's set as mandatory in the form set up. If the Umbraco Forms JS validation for it doesn't work out of the box, how do you hook this code into whatever Umbraco Forms is doing at submit to include it in the validation?
Any suggestions would be appreciated.
Thnx
I see this is an old issue:-
https://issues.umbraco.org/issue/CON-1552
https://github.com/umbraco/Umbraco.Forms.Issues/issues/36
If anyone has managed to integrate the client side into the UF validation schema I'd love to hear about it :)
is working on a reply...