A Beginner's Guide to Static Forms
Tags: programming, blog, website
Published: 2023-07-09 10:41:36

You’ve just developed this completely static website, nothing fancy; perhaps it’s just a business site for a client or a portfolio website for yourself. Now you would like to collect and save form submissions from visitors. Usually, you would have a “Contact Us” form with an email, full name, and probably message input. Something like this one:


![Contact Us page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xza2p9n2q37mzmhn5cmo.png)

This is a typical contact page design for most websites, although deciding how to store this submission can get complicated. Most times, you want the simplest solution with the least setup. Let’s see some easy-to-use options.

## FabForms

Fabform is a personal favourite. It’s an open-source form collection tool that provides an endpoint to submit/post your forms. Here’s how to get started.

First, create an account [here](https://app.fabform.io/signup), then create a new endpoint. Once that’s done, you can copy and paste the endpoint as the value of your form’s action.

```html
<form action="https://fabform.io/f/9DrEaKE" method="post">
  ...
</form>
```

That’s it. Let’s see some similar options.

---

## [Basin](https://usebasin.com/)
​
Much like FabForms, Basin also provides an endpoint to submit forms. The integration is also similar to Fabforms; you use the basin domain plus your unique form ID as the value of your form’s action. Be sure first to create an account [here](https://usebasin.com/users/sign_up).
​
```xml
<form action="https://usebasin.com/f/1a2b3c4d5e6f" method="POST">
...
</form>
```
​
For further integration and details, check out the [Basin docs](https://usebasin.com/docs/setup/getting-started).

---

## [FormSpree](https://formspree.io/)
Another alternative to Basin and Fabform is Formspree. They provide a reasonable freemium, but once you’re past the limit, you need to pay for a subscription plan to continue seeing your submissions. You can create an account [here](https://formspree.io/register).

```xml
<form action="https://formspree.io/f/{form_id}" method="post">
...
</form>
```

---

## [Google Form](https://docs.google.com/forms)

Another alternative solution would be Google Forms. This may already be obvious, but it would interest you to know that you can embed Google forms into your static sites. To set this up, ensure you have a Google account, then head over to [Google](https://docs.google.com/forms) forms and create a new form.

Once you’re done creating your form inputs, click on the “Send” button at the top right.


![Google Form](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dvof9btsssmkndp0g51l.png)

In the dialogue that comes up, you should select the embed tab and copy the iframe link. Finally, paste the link on the page you want google forms to render in.


![Form Embed Link](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s95nn1oic16uuyofn1gu.png)

---

## [Optimonk](http://optimonk.com/)

Optimonk allows you to create campaigns and design pop-ups and forms easily if you want something more dynamic and fancy. They also offer good freemium, which should provide enough space to experiment and use for small to medium websites.

> PS: You can see Optimonk in action on [Devjavu](https://devjavu.space/)

Integrating Optimonk with your website is pretty straightforward. First, create an account [here](https://app.optimonk.com/register/). Next, on the dashboard, you need to click “Campaigns” and “New campaign”.


![Optimonk](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ez2yai2d8cp3py4k881y.png)

You can select a brand colour in the next prompt:


![Choose Colour](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/73334mwewl6isefh6d5p.png)

Next, you can choose a theme you like from the suggested list based on your brand colour:


![Theme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ocn4haycj6zwzeju8teo.png)



Alternatively, you can skip these steps and choose a template that best fits your use case.


![Contact Form](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r5u4jls5mpl8pnf89x26.png)


After this, you can then choose what domain you would like to use Optimonk on in the next prompt:


![Choose Domain](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/omko6l6eakurg85lx5p1.png)



You should be presented with a dashboard to customize your selected template. Once you’re done with customization, you can click “next” until you save your new pop-up form. The last section allows you to set triggers and targets. With this, you can determine when to show your pop-up forms and who to show these forms to. Feel free to click next if this is not important for your use case.


![Campaign 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vcbuo4os78seyyu9q1wy.png)



Finally, on the next page, you need to install Optimonk on your website using Optimonk’s script. Select the options from the list depending on what kind of website you’re running.


![Finally](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/snokl1b4p6s1rwzoyuvi.png)



Copy and paste the javascript code into your website, and you should be good to go.


![Install Optimonk](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0hpzsy9kcb7jg0a4s0jm.png)



Your visitors should now be able to see and use your pop-up, and every new submission will be on your Optimonk dashboard.


![View leads](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uu8kboe7k0s4snle1wbf.png)

---

## Conclusion

Whatever option you choose, you need to consider how many responses you get from visitors. This should help you decide what bests fit your use case.

---

Cheers ☕️