FRAMEWORK
Give your Hugo site a form backend
Formstork receives the submissions from your Hugo contact form, emails you each one, and keeps every message in a searchable dashboard. Hugo builds static HTML, so there is no server to run and no backend code to write.
How it works
Hugo compiles your content into static HTML at build time, with no server or runtime behind it, so a form on your page has markup but nowhere to send what people type. Formstork is the backend that receives the POST. You place a plain HTML form in a layout, a partial, a shortcode, or a content page, point its action at a Formstork endpoint, and add your access key as a hidden field. Formstork then emails you each submission, sets the visitor's email as the reply-to, and saves the message to a searchable, taggable dashboard. Because it is a normal form POST with no client JavaScript, it works on any host you deploy Hugo to, from GitHub Pages to Netlify to Cloudflare Pages. Turn on spam filtering, an autoresponder, or an integration like Slack or Google Sheets whenever you need it.
{{/* layouts/partials/contact-form.html
Your access key is public, so it is safe to commit and ship. */}}
<form action="https://api.formstork.com/submit" method="POST">
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
<input type="text" name="name" placeholder="Your name" required />
<input type="email" name="email" placeholder="you@example.com" required />
<textarea name="message" placeholder="Your message" required></textarea>
<button type="submit">Send</button>
</form>
{{/* Render it anywhere with: {{ partial "contact-form.html" . }} */}}No server behind your static site
Hugo outputs static HTML with no runtime, and Formstork receives the form POST, so you never add a serverless function or a form-handling service of your own. Deploy to GitHub Pages, Netlify, Cloudflare Pages, or any static host and the same form keeps working.
Every message, kept and searchable
Beyond the inbox, Formstork stores each submission in a searchable, taggable dashboard you can filter and export to CSV or JSON. The free plan keeps 250 submissions a month with 90-day retention, and paid plans keep them forever.
Spam never reaches you
A hidden honeypot, a server-side content filter, and optional Turnstile, hCaptcha, or reCAPTCHA keep bots out. Flagged submissions are held back in your dashboard and never email you, so your inbox stays clean.
Set it up
- 1Add a plain HTML form to your Hugo site, in a partial like layouts/partials/contact-form.html, a shortcode, or straight in a content page, with fields like name, email, and message.
- 2Point the form's action at https://api.formstork.com/submit and add your access key as a hidden access_key field, or keep the key in your site config and read it in the template. The short /f/YOUR_ACCESS_KEY URL works too.
- 3Run hugo server and submit once to test. The message lands in your inbox and your Formstork dashboard, with the visitor's email set as the reply-to.
- 4Optional: turn on an autoresponder, or connect an integration like Slack or Google Sheets.
Frequently asked questions
How do I add a contact form to a Hugo site?
Add a plain HTML form in a partial, shortcode, or content page, point its action at https://api.formstork.com/submit, and add your access key as a hidden access_key field. Formstork receives the POST, emails you the submission with the visitor's email as the reply-to, and stores it in your dashboard. Because Hugo ships static HTML, this works with no server and no backend code.
Do I need a serverless function to receive submissions?
No. A plain form posts straight to Formstork, so a fully static Hugo build needs no serverless function, form-handling host, or SSR. If you want a client-side success message without a page redirect, you can send the same fields with fetch from a small script instead.
Is it free?
Yes. The free plan includes 250 submissions a month, email delivery, spam filtering, integrations, CSV and JSON export, and a 90-day retention window, with no credit card. Paid plans add more volume, forever retention, autoresponders, and file uploads.
Try Formstork free
250 submissions a month with a full dashboard. No credit card required.
Get your access keyRead the docs