I want to add recaptcha to a form, I registered for it and got the keys.
<form>
<input type="text" name="name" />
<input type="email" name="email" />
<textarea name="message"></textarea>
<input type="submit" name="submit" value="Send" />
</form>
Then I added this code to the page:
<script src='https://www.google.com/recaptcha/api.js?render=My_Website_Key'></script>
Next I added this Javascript/Jquery code:
//When page is loaded.
$(document).ready(function() {
grecaptcha.ready(function() {
grecaptcha.execute('The Website Key', {action: 'homepage'}).then(function(token) {});
}); //Recaptcha ready
}); //Page is loaded
Finally I'm trying to verify, But there is no hidden element with a value to use or anything to send to the backend to check.
So how to check from the backend?