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


#23

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


#24

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)


#25

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.

https://translate.google.com/translate?sl=fr&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=https%3A%2F%2Fwww.pierremorsa.com%2Fpost%2F2017-11-13-ajouter-formulaire-hugo%2F&edit-text=


#26

I personally use and recommend https://www.formata.io 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


#27

I developed a simple solution for that purpose https://kamilsk.github.io/form-api/. 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!


#28

@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.