Form basics

Static site

A static site is a website made of pre-built HTML, CSS and JavaScript files that a host serves as they are, with no server code running for each visit.

Also called: static website, static site generator, SSG, Jamstack

On a traditional site, the server builds each page when someone asks for it: it runs code, reads a database and returns HTML. On a static site the pages already exist. They were built once, ahead of time, and the host (often a CDN) just hands over the file.

Static site generators

A static site generator (SSG) is the tool that builds those files from templates and content. Hugo, Jekyll, Eleventy, Astro and Gatsby are well-known examples, and frameworks such as Next.js and SvelteKit can also produce static output. The approach of building the site in advance and adding dynamic features through APIs and services is often called the Jamstack.

Why people choose them

  • Speed. A file from a CDN is about the fastest thing a web server can do.
  • Security. With no server code and no database behind the page, there is much less to attack.
  • Cost and simplicity. Hosting can be cheap or free, and scaling is the host’s problem.

The catch

Anything that needs a server at the moment a visitor acts does not work out of the box: logins, search, comments and, above all, forms. The page can show a form, but when it is submitted there is nothing listening. The usual answer is to point the form’s action at a hosted form backend.

In StaticForm

StaticForm is built for this case. Create a form, copy the endpoint into your HTML, and the submission is validated, spam-filtered, stored and sent on to your email, Slack, Google Sheets or other tools, while your site stays static. It works with any site generator or host, and the blog has step-by-step guides for several of them.

Learn more