Configure reCAPTCHA v2
On Starter, Pro, or Agency, register the hostnames where your form runs for the reCAPTCHA v2 checkbox. In your Forms4Web form’s Settings, select Google reCAPTCHA v2 and save the verification secret there. The Free plan supports hCaptcha.
Copy the contact form
Replace the Forms4Web origin and form access key with the values from Setup. Replace YOUR_RECAPTCHA_SITE_KEY with Google’s public site key. The widget adds the g-recaptcha-response field when a visitor completes the challenge.
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<form action="https://api.bitebrake.com/api/submit" method="post">
<input type="hidden" name="access_key" value="YOUR_FORM_ACCESS_KEY">
<label>Name <input name="name" autocomplete="name" required></label>
<label>Email <input name="email" type="email" autocomplete="email" required></label>
<label>Message <textarea name="message" rows="5" maxlength="4000" required></textarea></label>
<div class="g-recaptcha" data-sitekey="YOUR_RECAPTCHA_SITE_KEY"></div>
<div hidden><label>Leave empty <input name="botcheck" tabindex="-1" autocomplete="off"></label></div>
<button type="submit">Send message</button>
</form>Test the published form
Submit a test after completing the challenge and confirm it reached your inbox. Then test submitting with no challenge response. Forms4Web verifies the response before accepting the submission. Complete a fresh challenge before retrying if Google reports an expired or previously used response.