HTML forms as a service
I’m back looking at services again, still with the theme of static sites and applications. As always, thanks for reading and reply to this email if you have any feedback or requests.
Thinking back, I remember the excitement of creating CGI scripts in Perl to handle form submissions where the usual result was to email the often poorly formatted information to myself. This was before getting access to a database was common. Here we are 20+ years later and while a lot has changed, some things are the same. How do we handle the simple forms we want to have on our static sites?
Obviously, if you are creating an application with data needs you will probably need to look at a hosted database or backend as a service option. We will explore those in the future, because today I’m talking about dealing with the simple forms. Contact forms, basic surveys, even newsletter signup. Things you might have on a basic site or landing page.
And so, instead of creating your own serverless endpoint and saving details in a database somewhere, you can let someone else deal with all of that by using one of these services. The basic premise is that you create your form as normal on your site, and set the ‘action’ attribute to an endpoint provided by the service and they will store the result and notify you.
Basin
I looked at a lot of these form services, and Basin is currently at the top of my list for a couple of reasons. Their free account, while limited to a single form endpoint, allows for unlimited submissions. They also allow you to export your data, which is essential, free or otherwise. With Zapier integration, AJAX support, spam protection and GDPR data receipts, the free account at Basin is one of the few which doesn’t feel strictly like it is a trial. The only feature you may miss is file uploads. However, Basin is also the cheapest option that I’ve seen if you want to upgrade to a paid account.
Pageclip
Pageclip is similar, and they allow 1000 monthly submissions on their free plan which is better than most. They don’t seem to support file uploads even on their paid plans, but perhaps I’m misinterpreting something. Pageclip does provide their own JavaScript library which supports some more advanced cases, however, the basics of POSTing to a URL still works as you’d want.
Google Forms
I wanted to include Google Forms because they take a slightly different approach. Instead of just handling the backend receipt of form submissions, they provide the full form experience including the UI and hosting. In fact, you don’t even need your own site, you can use Google Forms to collect data (like survey results) just by sending people to your public form URL. They also allow for forms to be customized and embedded into your own site via iframe. This approach may be simpler to manage particularly if your data entry requirements are more complex. All free with a Google account.
https://www.google.com/forms/about/
Netlify Forms
If you read my issue on static site hosting, you will recall that Netlify featured very favourably there. If you are hosting your site or application with them, then they provide their own form data collection feature. Unlike others which provide you with an endpoint directly, Netlify will parse your pages looking for forms with a particular attribute at deploy time. They offer limited monthly submissions (100) but you can integrate with your Netlify serverless functions if you want. If you need more than 100 submissions a month, it is probably cheaper to look at some of these other options.
https://www.netlify.com/docs/form-handling/
And while we are talking about forms and Netlify, take a look at this JAMstack Comments site. It describes a flow which allows you to use one of these simple forms services (in their case, Netlify) to have moderated comments embedded directly in your pages without needing to use a third party comment service.