# Contact form for Jekyll

> An include with the form, and the form ID in _config.yml. Works on GitHub Pages, with no plugin and no JavaScript.

Last updated 2026-11-14. Web version: https://wrenform.com/docs/frameworks/jekyll

```liquid
{% comment %} _includes/contact-form.html
   In _config.yml:  wrenform_id: YOUR_FORM_ID {% endcomment %}
<form action="https://wrenform.com/f/{{ site.wrenform_id }}" method="POST">
  <label>Name <input type="text" name="name" autocomplete="name" required></label>
  <label>Email <input type="email" name="email" autocomplete="email" required></label>
  <label>Message <textarea name="message" required></textarea></label>
  <input type="text" name="_honey" style="display:none" tabindex="-1" autocomplete="off">
  <button type="submit">Send</button>
</form>
```

## Steps

1. [Create a form](/sign-in) and copy its form ID, or let your AI tool create one [without an account](/docs/quick-forms).
2. Add `wrenform_id: YOUR_FORM_ID` to `_config.yml`, with your form ID.
3. Save the snippet as `_includes/contact-form.html`.
4. Create `contact.md` with front matter (`layout: page`, `title: Contact`, `permalink: /contact/`) and the line `{% include contact-form.html %}`.
5. Add a thank-you page, for example `thanks.md` with `permalink: /thanks/`, and set it as the form's **Success URL** (see [redirects](/docs/redirects)).
6. Deploy. Then add your site's origin under **Allowed origins** in the form's settings.

This works on GitHub Pages as is: no plugin, no build step beyond Jekyll's own, and no JavaScript. Restart `jekyll serve` after editing `_config.yml`; it isn't reloaded automatically.

## Test it

Run `bundle exec jekyll serve`, open `/contact/` and send the form. You should land on your thank-you page, see the submission in your dashboard and get an email. While testing locally, leave **Allowed origins** empty or add `http://localhost:4000`.

## Common problems

- **The form posts to `/f/` with no ID.** `wrenform_id` is missing from `_config.yml`, or the server wasn't restarted.
- **You see Wrenform's own thank-you page.** Set the form's Success URL to your `/thanks/` page.
- **`origin_not_allowed`.** Add the site's origin, including `https://`, to the form's allowed origins.

## Next steps

- [My form isn't working](/docs/troubleshooting): symptom, cause and fix.
- [Spam](/docs/spam): the optional helper script adds a timing check.
- [Fields](/docs/fields): subjects, reply-to and lists.
- [Errors](/docs/errors): every code and its fix.
