Simple Contact Form with Google reCAPTCHA

A simple contact form, styled with Bootstrap and using Google's reCAPTCHA v2 to fight Spam - in this instance using the Checkbox reCAPTCHA.

We'll never share your email with anyone else.

Add the highlighted line to your form, making sure to swap your_site_key for your Google reCAPTCHA Site Key.

<form action="https://api.staticforms.co/Submit?form=<<YOUR UNIQUE FORM ID>>" method="POST" id="contact-form">
    <div class="form-group">
        <label for="name">Name</label>
        <input type="text" class="form-control" name="name" placeholder="First name" required />
    </div>
    <div class="form-group">
        <label for="email">
            Email address
        </label>
        <input type="email" class="form-control" name="email" placeholder="[email protected]" required />
        <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
    </div>
    <div class="form-group">
        <label for="message">
            Message
        </label>
        <textarea name="message" required class="form-control"></textarea>
    </div>
    <div class="form-group">
        <div class="g-recaptcha" data-sitekey="your_site_key"></div>
    </div>
    <div class="bg-white text-center pt-4 pb-2 mb-2">
        <button type="submit" class="btn btn-primary rounded-pill">Submit</button>
    </div>
</form>

Add the following just before the closing head tag

<script src="https://www.google.com/recaptcha/api.js" async defer></script>