Add a contact form to a static site in 5 minutes

Static sites are fast and simple, but a contact form needs something to receive the message. This guide sets one up with FormDoc using only HTML.

What you need

  • A static website you can edit (any generator, or plain HTML).
  • An email address to receive messages.

Step 1: get an access key

Open app.formdoc.dev/new, enter your email address and confirm it from the email you receive. You’ll get an access key that starts with fd_.

Step 2: paste the form

Add this to your contact page and replace YOUR_ACCESS_KEY:

<form action="https://api.formdoc.dev/v1/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
  <label for="name">Name</label>
  <input type="text" id="name" name="name" required>
  <label for="email">Email</label>
  <input type="email" id="email" name="email" required>
  <label for="message">Message</label>
  <textarea id="message" name="message" required></textarea>
  <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" autocomplete="off">
  <button type="submit">Send</button>
</form>

Each field’s name becomes its label in your email, so use names that make sense to you, such as phone or company.

Step 3: choose where visitors go next

After sending, visitors see a hosted thank-you page with a link back to your site. To use your own page, add:

<input type="hidden" name="redirect" value="https://example.com/thanks/">

Step 4: test it

Publish your page, send yourself a message and check your inbox. If nothing arrives, check that you confirmed your email address; the FAQ lists the other common causes.

That’s it: a working contact form with spam protection, no server and no code to maintain.