Turnstile Disable Until Button
Hmm, all I want to do is disable a button... and re-enable it when turnstile is approved. Not sure why I am 30m+ into this task. Can someone please help?
2 Replies
<script>
function onloadTurnstileCallback(turnstileResponse) {
// Assuming successful verification if the turnstileResponse is truthy
if (turnstileResponse) {
document.getElementById("form_submit").disabled = false;
}
}
document.getElementById("form_submit").disabled = true;
</script>
Got it. I guess simply is there a callback for this like "if (turnstile.isVerified()) {"
turnstileWidget.addEventListener('cf-turnstile-verified', function() {
Nothings working
GOLD
Thank you @leodeveloper
Can data-callback ever be FALSE?
And inherently enable the submit button even tho its false?
Guess not