Skip to content

Instantly share code, notes, and snippets.

@virtuosomaster
Created October 12, 2017 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save virtuosomaster/5699233bde1367272e47fd9c8d9520a4 to your computer and use it in GitHub Desktop.
Save virtuosomaster/5699233bde1367272e47fd9c8d9520a4 to your computer and use it in GitHub Desktop.
Simple custom form with google captcha
<html>
<body>
<script type="text/javascript">
function enableBtn(){
document.getElementById("submit").disabled = false;
}
</script>
<form id="form" method="POST" action="">
<input type="text" name="name" class="name" placeholder="Full Name" required="required">
<div class="g-recaptcha" data-sitekey="my-google-site-key" data-callback="enableBtn"></div>
<input id="submit" type="submit" name="submit" value="Submit" disabled="disabled">
</form>
<script src='https://www.google.com/recaptcha/api.js'></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment