I have used this code from google recaptcha, but the submit didn't work (after google captcha nothing happen), the form is not submitted, maybe because i have added my own action for the salesforce ?
<html>
<head>
<script>
var onSubmit = function(token) {
console.log('success!');
};
var onloadCallback = function() {
grecaptcha.render('submit', {
'sitekey' : 'your_site_key',
'callback' : onSubmit
});
};
</script>
</head>
<body>
<form action="https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" thod="POST">
<input id='submit' type="submit" value="Submit">
</form>
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit"
async defer>
</script>
</body>
</html>
i have also used google recaptcha v3,
my form is submitted but in server side i receive an empty array.
thod
instead ofmethod.
– Haematothermal'sitekey' : 'your_site_key',
you used your recaptcha key right? second, do you get any errors in Console? – Strikesubmit
. I see that you have the same case, so maybe the solution for v2 was to change submit button's ID, in your case. – Vaughn