ReCaptcha 2.0: enable submit button on recaptcha successful

recaptcha

<div class="g-recaptcha" data-sitekey="####" data-callback="enableAction"></div>

input submit button

<input type="button" value="Submit" id="submitbtn">

On load page javascript

 document.getElementById("submitbtn").disabled = true;

javascript to enable the button

functionenableAction(){ document.getElementById("submitbtn").disabled = false; }

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.