Hugo contact form as a partial
Hugo builds plain HTML, and a plain HTML form is all Formbold needs. Save the form as a partial, point it at your endpoint, and every submission is emailed to you.
What do I put in the partial?
Save this as layouts/partials/contact-form.html and call it from any layout with {{ partial "contact-form.html" . }}. Replace FORM_ID with the ID from your Form Setup tab.
Setting it up in Hugo
Create a form in Formbold, save the partial, test it locally.
Create a form
In Formbold, click Create New Form and copy the endpoint. Free gives you 10 forms.
Save the partial
Paste the form into layouts/partials/contact-form.html with your endpoint in the action attribute.
Test with hugo server
Submit once on localhost:1313 and check Submissions before you deploy.
Formbold on a Hugo site
Hugo stays a static site generator. Formbold receives the post, stores it and sends it on.
No server in your stack
Deploy to Netlify, Cloudflare Pages, GitHub Pages or S3 as usual. Nothing new runs anywhere.
Captcha without keys
Hugo outputs a native HTML post, so Automatic reCAPTCHA works without any keys. Turn it on along with Basic Spam Filter.
Uploads on paid plans
Starter and up. Give the partial's form tag enctype="multipart/form-data" and add a named file input.
Thank-you page
On Starter and higher, set a Redirect URL to a Hugo page such as /thanks/.
Shortcodes, Markdown and spam
Answers about shortcodes, Markdown and spam.
Still have a question?
The docs cover setup, framework guides, integrations and spam protection, step by step.