Answer the question
In order to leave comments, you need to log in
Recaptcha invisible, out of form generation?
I've been suffering for 3 hours now and I can't connect Invisible v2 recaptcha.
The bottom line is, you need to generate a recaptcha-response before the 'submit' button, since sending goes through js and should be sent with other data
(Or somehow make it so that only after the button and together with the response is sent)
The JS code itself
const request = new XMLHttpRequest();
const url = "data.php";
const params = "test= " + test + "&public=" + grecaptcha;
request.open("POST", url, true);
request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
request.send(params);
<form class="unlock">
<input aria-invalid="false" id="pass" autocomplete="off" type="text" dir="auto">
<button>Unlock</button>
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question