Is it possible to add a contact form to a site?

If you deploy with Netlify, they have a form handling service.


Netlify’s form handling is as simple as could be – just add a form and a data attribute to it, and they will handle the data. You can easily use post hooks to send it to Zapier and then on to wherever (I use it to send to a Mailchimp list)

Hi, as I said in a post a while ago, here is a tutorial to add a contact form in Hugo using Zapier Webhooks and a bit of JavaScript. My original post is in French but here is the translated text using Google Translate. Please note that the code will probably need to be tweaked for your particular website and needs.

I personally use and recommend it’s been great for us since we manage like 75+ sites, most of them are static sites and we need something reliable that can handle hundreds of requests per month. Give it a try it’s the best we have used so far

1 Like

I developed a simple solution for that purpose It is open source, free and can be self-hosted. The main disadvantage that it is MVP now and can handle only simple forms (email, text).

Thanks for sharing me cool services for inspiration!


@askar you can see by all the responses, there’s a dynamic component in getting forms to work. I use a database that provides an embed code (javascript inside script tags) for this, which lets me collect any data and also send emails to either the submitter or to someone else.

In the end, as you say Hugo is a SSG, and it just assembles what you give it into a website, so, you can use whatever form processing system you like. There are many.

I expanded it to Hugs - Platform for Static Sites

I run a bunch of static sites and so built my own solution with a generous free plan that will work for like 99% of folks using static sites:

You can either use a UI to build a form, or just point your existing forms at a POST endpoint, dead easy.

Hope that helps. I’m a small provider but it is profitable and reliable, so I’ll be around for a while :slight_smile:

Getform is one of the best solution for static form handling. It has tons of features like zapier integration, file upload, spam protection, email notification, invite team and more.

If you’re deploying your site to a traditional host that supports PHP, you can build a simple PHP mailer script and process any contact form submissions via AJAX.

There are a lot services that allow you to send out emails for a simple contact form. For more advanced forms checkout