Add a Contact Form to Your Hugo Static Site

Hugo is one of the fastest static site generators, but static sites can't process form submissions natively. FormsList provides the missing piece — a form backend that works with Hugo's HTML templates, requiring no server-side code or build plugins. Adding a form to a Hugo site is as simple as including an HTML form in your template or content file with the action attribute pointing to your FormsList endpoint. Hugo's template system makes it easy to create reusable form partials that you can include across your site. FormsList is the ideal form backend for Hugo sites because it requires zero build-time configuration. There are no Hugo modules to install, no shortcodes to create, and no JavaScript bundles to add. Your Hugo site stays fast and your build times stay short.

Setup Hugo with FormsList

1

Create a FormsList endpoint

Sign up at FormsList and create a new form. Copy the endpoint URL.

https://formslist.com/f/YOUR_FORM_ID
2

Create a Hugo partial for the form

Add a form partial in layouts/partials/ with your FormsList action URL. Include it in any page template with {{ partial }}.

{{/* layouts/partials/contact-form.html */}}
<form action="https://formslist.com/f/YOUR_FORM_ID" method="POST">
  <input name="name" required />
  <input name="email" type="email" required />
  <textarea name="message" required></textarea>
  <button type="submit">Send</button>
</form>
3

Deploy and configure

Build your Hugo site (hugo build) and deploy to Netlify, Cloudflare Pages, or any static host. Configure notifications in FormsList.

Why use FormsList with Hugo?

No Hugo module or build plugin required
Works with Hugo's template partials system
Zero JavaScript — pure HTML form
Compatible with any Hugo theme
Built-in spam protection with honeypot fields
Custom redirect to a Hugo thank-you page

Frequently Asked Questions

Ready to collect form submissions?

Set up your form backend in under a minute. No server required, no complex configuration — just a simple endpoint for your forms.