I am trying to implement the invisible Google ReCAPTCHA v2 with the Lock sign up form.
The problem I am facing is I cannot make the recaptcha element mandatory as that would mean every user (not just bots) would have to solve the captcha puzzle. The issue that arises is when it is a bot, the Lock sign up fields are correctly filled (no validation error) and submit button is clicked, Lock simply submits the form and doesn’t care about whether the Captcha is solved or not. The form shouldn’t get submitted unless a valid captcha token is received in the captcha callback. Any workaround possible for this?
The form needs to be prevented from being submitted if captcha puzzle is presented but is not validated yet (not captcha token available in callback)
Note: I can make the explicitly rendered recaptchav2 work by forcing the captcha form element as mandatory. That wouldn’t let the form to be submitted unless it has value. Can’t do that for invisible recaptchav3 as the intention is valid users shouldn’t be bothered.