Skip to content

Instantly share code, notes, and snippets.

@JhonatanHern
Created March 15, 2019 16:41
Show Gist options
  • Save JhonatanHern/3de3432b6f4897a9f0e6f681021b333b to your computer and use it in GitHub Desktop.
Save JhonatanHern/3de3432b6f4897a9f0e6f681021b333b to your computer and use it in GitHub Desktop.
<script src="https://www.google.com/recaptcha/api.js?render=6LduhJcUAAAAAJ7L1bpfSKOIkzvnWOX4hPgNDNBO"></script>
<script>
grecaptcha.ready(function() {
grecaptcha.execute('6LduhJcUAAAAAJ7L1bpfSKOIkzvnWOX4hPgNDNBO', {action: 'form_validation'}).then(function(token) {
document.getElementById('g-recaptcha-response').value = token;
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment