- Docs
- Quick starts
Contact form on GitHub Pages
GitHub Pages serves static files and nothing else: no PHP, no serverless functions, nothing to receive a POST. Point your form at FormRill and it works, with no build step or Action to add.
1. Get your form URL
Sign up with your email. The dashboard opens on a form that already emails you; copy its Form URL.
2. Add the form
Plain HTML site: paste it into any page. Jekyll site: save it as _includes/contact-form.html. Either way, replace YOUR_FORM_ID with your form ID.
<form method="POST"
action="https://api.formrill.com/YOUR_FORM_ID/submit">
<input type="checkbox" name="botcheck" hidden />
<input type="text" name="name" required />
<input type="email" name="email" required />
<textarea name="message" required></textarea>
<button type="submit">Send</button>
</form>Then use it from any page or layout:
---
title: Contact
---
{% include contact-form.html %}3. Send visitors to your own thank-you page
The redirect must be a full URL. In Jekyll, build it from your site settings:
<input type="hidden" name="redirect" value="{{ '/thanks/' | absolute_url }}" />On a plain HTML site, write it out: https://you.github.io/thanks.html.
4. Lock it to your domain (optional)
In the form’s settings, add you.github.io (or your custom domain) to Allowed domains. Posts from anywhere else get a 403. Domain whitelisting is a Pro feature, free during the beta.
Get the form URL for this guide
Free up to 500 submissions a month and unlimited forms. No server, no credit card.
Start freeRelated
- Plain HTML quick start
The same form, explained line by line.
- Hugo quick start
Another static generator, same approach.
- Submission API reference
Redirects, JSON mode and status codes.