Add a contact form to your Eleventy site using Nunjucks templates. No server code or serverless functions needed — FormsList handles everything.
TL;DR
To add a contact form to an Eleventy site, create an HTML form in a Nunjucks template with action set to `https://formslist.com/f/your-form-id`. Eleventy generates static HTML, so FormsList handles submissions, email notifications, and spam filtering without any server code.
Sign up for a free FormsList account and create a new form. Copy the endpoint URL — you will use it as the form action in your Eleventy template.
Create a Nunjucks template for your contact page. The form uses a standard HTML POST action pointing to your FormsList endpoint. You can also create this as a reusable Nunjucks include.
{# src/contact.njk #}
---
layout: base.njk
title: Contact Us
permalink: /contact/
---
<h1>{{ title }}</h1>
<p>Get in touch with us using the form below.</p>
<form action="https://formslist.com/f/YOUR_FORM_HASH" method="POST" class="contact-form">
<div class="form-group">
<label for="name">Name</label>
<input type="text" id="name" name="name" required />
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" id="email" name="email" required />
</div>
<div class="form-group">
<label for="message">Message</label>
<textarea id="message" name="message" rows="5" required></textarea>
</div>
{# Optional: redirect after submission #}
<input type="hidden" name="_redirect" value="/thanks/" />
<button type="submit">Send Message</button>
</form>For reuse across multiple pages, extract the form into a Nunjucks include file and reference it with the include tag.
{# _includes/contact-form.njk #}
<form action="https://formslist.com/f/YOUR_FORM_HASH" method="POST" class="contact-form">
<div class="form-group">
<label for="name">Name</label>
<input type="text" id="name" name="name" required />
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" id="email" name="email" required />
</div>
<div class="form-group">
<label for="message">Message</label>
<textarea id="message" name="message" rows="5" required></textarea>
</div>
<button type="submit">Send Message</button>
</form>
{# Use in any page: #}
{# {% include "contact-form.njk" %} #}Add a fully functional contact form to any HTML website in under 5 minutes. No JavaScript frameworks, no server setup — just plain HTML that works everywhere.
Learn moreAdd a fully functional contact form to any static site generator — Jekyll, Hugo, Eleventy, Astro, or plain HTML. No server-side code required.
Learn moreAdd a working contact form to your Hugo static site using an HTML partial. No server code required — FormsList handles all submissions.
Learn moreSet up your form backend in under a minute. No server required, no complex configuration — just a simple endpoint for your forms.