# Add a contact form to an HTML site

> Add a working contact form to a plain HTML site with SiteBackend - copy-paste form markup, spam protection and a thank-you page.

Source: https://sitebackend.com/docs/forms/html · Updated: 2026-09-28

All you need is a `<form>` that posts to your SiteBackend endpoint. No JavaScript or server required.

```html title="contact.html"
<form action="https://api.sitebackend.com/forms/YOUR_FORM_ID" method="POST">
  <label for="name">Name</label>
  <input id="name" type="text" name="name" required />

  <label for="email">Email</label>
  <input id="email" type="email" name="email" required />

  <label for="message">Message</label>
  <textarea id="message" name="message" rows="5" required></textarea>

  <input type="text" name="_gotcha" tabindex="-1" autocomplete="off" style="display:none" />
  <button type="submit">Send message</button>
</form>
```

## How do I collect more fields?

Add any input with a `name`. Checkboxes and multi-selects that share a name are stored as a list:

```html
<fieldset>
  <legend>Interested in</legend>
  <label><input type="checkbox" name="topics" value="pricing" /> Pricing</label>
  <label><input type="checkbox" name="topics" value="support" /> Support</label>
</fieldset>
```

## Where does the visitor go after submitting?

To the SiteBackend thank-you page, with a link back to your site. To use your own page, set a redirect URL. To stay on the page, submit with JavaScript.

## Show testimonials too

SiteBackend can also collect testimonials from your customers and show them on your site, with two lines of embed code. See add testimonials to any website.
