2
32 Comments

How do you accept form submissions on your static site?

I have developed — and currently host — several static websites, which always need some version of a contact form.

How do you handle form submissions on your static website? How do you work with that data? Which services do you use? What are some pain points you have with doing all this, that haven't yet been addressed?

posted to Icon for group Developers
Developers
on February 19, 2021
  1. 3

    "What are some pain points you have with doing all this, that haven't yet been addressed?" Is the same as asking "Give me some startup idea around this please".

    Read The Mom Test, it gives superb advice on how to talk to customers and learn about their problems in an indirect way so you can get proper and honest feedback

    1. 1

      Ah. I see how I might have come across that way.

      I wasn't thinking about this as asking customers, but more as asking peers if they're having some of the same problems as me. I couldn't find a service suited to my needs, and I wanted to see if it was just me.

      But since posting this, I have been checking out a lot of services in this space, and I think I see a gap which I can fill — so I'll indeed be building a form backend :) I think it will be fun to build it openly on IH too, so stay tuned!

      Thanks for the advice, and the few pages I've read so far of The Mom Test are great.

  2. 2

    I have two ways I do this with static sites.

    1. I have some hosted on Netlify which gives me basic form support out of the box and captures the data.
    2. I have an embedded Airtable form that captures it to their backend where I can see the data from here.

    Hope this helps :)

    1. 1

      Thankyou! I've just been introduced to Airtable — looks great, I'll check it out.

      1. 1

        Cool, I would love to hear what you think and find. I'm always looking to improve my process and workflow.

        1. 1

          Thanks, I'll update here / share a blog post with what I find 👍

  3. 2

    I've used StaticForms for all my recent projects.

    Disclosure...I built StaticForms! :-)

    1. 1

      I agree dope product! How did you come up with your pricing? I am a fan of the charge-per-submissions route vs unlimited.

      1. 2

        I was trying to find a balance between charging for value provided, affordability, and limiting my risk...running the product has a cost and I didn’t want to be exposed to uncapped costs if someone used it and got huge volumes of responses. I’m not sure the pricing is right yet though .

    2. 1

      Hey, neat product!

      Disclosure: As I mentioned in another comment, I am thinking of building a form backend — so we're neighbours I guess :)

      1. 1

        Honestly, it’s a crowded space and whilst it’s not too hard to get users, it’s very hard to get paying customers. It was a fun challenge building StaticForms, but success is much more about marketing than the technical side, and I’m no marketer.

  4. 2

    How do you host the static site? If you use netlify they have a forms feature where with a little bit of setup (adding a tag to the html form), it'll collect any form data in any POST request. I use this for 2 projects that I host on netlify.

    1. 1

      Netlify Forms looks great, but I don't know how I'll give form / submission data access to other non-tech people — if I'm just building the site for them, I typically don't want to be able to look at their data; and I wouldn't want to give them access to my Netlify team because there are other sites there.

  5. 2

    Google Apps script that saves a new row to a Google Sheet and redirects to thank you page.

    It does not have email double opt in though, so there's some spam when I'm using it for collecting an email list.

    1. 1

      I'm actually work on this. Do you mind saving my info so we can talk about this later?

    2. 1

      That's a pretty nice idea. I haven't worked with Apps script before, though. How do you transfer the emails elsewhere once you've collected them: I suppose you'll want to put them on mailchimp or something?

      1. 2

        Apps scripts are Javascript/Typescript scripts that have some pre-authorized API clients.

        Like if you pre-authorize your app script with a Google Sheet, then your script can be something like:

        Sheets.getSheet(xyz).setCell("A1", "hello world")
        

        You can also do really simple API endpoints, send mail with Gmail etc.

        How do you transfer the emails elsewhere once you've collected them: I suppose you'll want to put them on mailchimp or something?

        Now I use it with my personal blogs, so I'm copy-pasting the emails from sheets to Gmail's bcc field. If I would use MailChimp, they would have their own form API that I could use. But as I'm not making any money off my blogs (at least yet), I don't have much budget for using commercial tools (at least MailChimp is pretty pricey for my use case). Some cheaper tools have better price points, but they usually use shared IPs for sending all mail and don't have as good reputation systems so they're usually blacklisted by Gmail and others — and there's no incentive for those providers to do anything about it since they upsell private IP sender addresses to fix that spam folder problem.

        1. 2

          Thanks for the concise explaination, @jehna :)

          I used to recommend https://github.com/freeCodeCamp/mail-for-good to people who wanted cheaper alternatives to send email. Although the repo is archived now, it might be worth taking a look at.

          Good luck to you! :)

  6. 2

    Airtable solves all my problems. I was debating on creating a no-code form builder, but there really doesn't seem to be any point.

    For catcpha validation, I use a simple aws lambda function that's basically free (doubt it'll hit more than 1 million requests a month), and then make a HTTP request to Airtable to store the content.

    It works well so far!

  7. 2

    One of my biggest issues was easily building forms that calculated in the browser. So I created sheetform.io(website not live). It turns a spreadsheet into a embeddable calculator form for your website.

    1. 1

      What do you mean by calculator form? Do you mean that it converts spreadsheet formulae into form inputs?

      1. 1

        I meant it takes a spreadsheet, and converts it into a html form where most, if not all of the formulas still work live in the browser..

        1. 1

          Neat idea! Good luck :)

  8. 1

    I use Netlify for hosting and their forms feature. For newsletter signups, I create a Zapier zap that adds new Netlify form submissions automatically to my list in Mailerlite.

  9. 1

    I used Formcarry for a while and it's super easy to implement and configure https://formcarry.com/

    1. 2

      Looks neat! And I love the website design :)

  10. 1

    For super low-tech: Just make the form submit to your static site with query parameters, and have the destination be a thank you page. And then every day, process your web logs for new form submissions.

    1. 1

      Nice trick, but I suspect this will become real high-tech real fast, for multiple reasons:

      1. If I have hundreds of visits a day, then this quickly becomes a storage sink in terms of logs.
      2. I don't really want form values sticking around in logs and browser histories. I am against putting customer data in logs, as a general rule.
      3. I still have to store the processed stuff somewhere and then share it with the customer.

      This is just my opinion, and to give an insight to people who might chance upon this later. But if it works for you, then great! Thanks for sharing :)

      1. 1
        1. Hundreds of logs per day is nothing for computers. Literally unnoticeable.
        2. You can avoid putting it in browser history by having some JS perform the post, so that's not a big deal. Whether or not you want it in your logs is a separate question. At the end of the day, it's all storage so there isn't really a legal distinction between logs and someone else's database to be concerned about, but I understand it might not feel right.
        3. Depends on what your goal is with the form submission. Most organizations are already processing their logs, and if you're at hundreds of requests per day, this is really a trivial amount of computation.
Trending on Indie Hackers
Your build-in-public audience is not your market. I learned the difference the slow way. User Avatar 106 comments I built a WhatsApp AI bot for doctors in Peru — launched 3 weeks ago, 0 paying customers, and stuck waiting for Meta to approve my app User Avatar 58 comments From broke and burned out as a PM, to launching my SaaS and optimizing my health User Avatar 30 comments Built a "stocks as football cards" thing. 5 days in, my launch tweet got 7 views. What am I missing? User Avatar 25 comments I kept starting projects and dropping them. So I built a system that wouldn’t let me User Avatar 23 comments We built Shopify themes to $20k/month. Now we have to pivot. User Avatar 22 comments