# Jekyll form to email

> Add a working form to a Jekyll or GitHub Pages site with FormDoc. Paste the HTML or use an include, and submissions are emailed to you.

Jekyll and GitHub Pages serve static files only, so a form needs somewhere else to send its data. Point it at FormDoc and each submission arrives in your inbox.

## 1\. Create an include

Save this as `_includes/formdoc.html` and replace the key with yours from [app.formdoc.dev/new](https://app.formdoc.dev/new):

HTML

```html
<form action="https://api.formdoc.dev/v1/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">

  <label for="fd-name">Name</label>
  <input type="text" id="fd-name" name="name" autocomplete="name" required>

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

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

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

## 2\. Add it to a page

In any page, post or layout:

TEXT

```text
{% include formdoc.html %}
```

Jekyll’s default Markdown renderer passes HTML through, so you can also paste the form straight into a Markdown page.

## Next

-   Your own thank-you page: add a hidden `redirect` field (see [send an HTML form to email](https://www.formdoc.dev/docs/)).
-   Every field and error code: [API reference](https://www.formdoc.dev/docs/api-reference/).
