I have included the recaptcha v3 to my simple html form, the form submit good, but in the server side i find an empty array coming to inbox. Here a copy/paste of my form code:
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<script>
function onSubmit(token) {
document.getElementById("mywebsite_form").submit();
}
</script>
<form id="website_form" class="website-form" action="https://webto.mywebsite.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
<input type=hidden name="oid" value="00D58000000H4Yu">
<input type=hidden name="retURL" value="http://www.mywebsite.com">
<div class="form-row">
<div class="form-group col-md-6">
<label for="first_name">First Name</label>
<input class="form-control" id="first_name" maxlength="40" name="first_name" size="20" type="text" /><br>
</div>
<div class="form-group col-md-6">
<label for="last_name">Last Name</label>
<input class="form-control" id="last_name" maxlength="80" name="last_name" size="20" type="text" /><br>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="email">Email</label>
<input class="form-control" id="email" maxlength="80" name="email" size="20" type="text"/>
</div>
</div>
<div class="form-group col-md-12">
<label for="subject">Subject</label>
<input class="form-control" id="subject" maxlength="80" name="subject" size="20" type="text"/>
</div>
<div class="form-group col-md-12">
<label for="description">Description</label>
<textarea class="form-control" name="description"></textarea>
</div>
<button class="g-recaptcha"
data-sitekey="mywebsite_key"
data-callback='onSubmit'
data-action='submit'>Submit</button>
</form>
What additional lines should i add to make the form fields arrive to the other side "server"?
you should include the "reCAPTCHA_site_key" parameter in the url of the google script