55

I have to add a contact form to a static website. I already got some experience with forms, done 2 or 3 using django/python, but sadly using django is not an option here, it has to be added to a static website. Could you please tell me what options do I have?

mmln
  • 2,104
  • 3
  • 24
  • 33
  • I've done a solution using formspree.io in my Hugo blog. here is the link to my blog that describes the process http://classandobjects.com/tutorial/add_subscribe_button_on_static_site/ – aks Sep 16 '16 at 19:01
  • 1
    I use https://www.staticforms.xyz/ it free. A very easy way to add forms to your static website – Hussain Fakhruddin Aug 14 '19 at 14:56

11 Answers11

42

You could set up a Google Docs form to mimic a contact form and include the form into your website by using the snippet that Google tells you for your form.

By using notification rules you can get automatic notifications, every time someone fills out the form.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
25

Have a look at Form Spree, you can simply add a <form> with an action posting to their service, and get an email each time someone fills the form.

Very efficient!

Consider API Form solutions like Web3Forms or FormKeep

Surjith S M
  • 6,642
  • 2
  • 31
  • 50
Sébastien Saunier
  • 1,787
  • 2
  • 19
  • 28
  • 1
    Unfortunately they're phasing Brace out after being [bought by Squarespace](http://blog.brace.io/2014/11/17/squarespace/) – fregante Dec 21 '14 at 10:57
  • 2
    Brace Forms has been open sourced and renamed formspree: http://formspree.io/ – aharris88 Feb 19 '15 at 19:04
  • I update the answer link. – Sébastien Saunier Mar 30 '15 at 13:49
  • Is there a service specifically focused on contact forms? All these services are too costly for a dumb contact form which says "your@emailhere" and "content" and just sends an email. Most mailing services (sendgrid, mailgun, etc.) have free plans around 12000 emails, and these services keep limiting submissions to 1000, which makes the whole thing kind of pointless. Or have a $20/month pricing, for which you can get a full managed server. – Francesco Belladonna Apr 06 '18 at 02:11
  • 3
    Form Spree leaks your email address to spammers (by forcing you to have it inside your HTML instead of hiding it). Furthermore it subjects your users to reCAPTCHA ("which of these images have traffic lights...") – Atte Juvonen Feb 14 '19 at 11:53
13

If you are looking for a simple solution it doesn't get much easier than fwdform. I wrote it myself when I needed quick and dirty contact form processing on my own static site.

To get your form forwarded to your email you just need to do the following.

1.Register

Make an HTTP POST request to register your email.

$ curl --data "email=<your_email>" https://fwdform.herokuapp.com/register
Token: 780a8c9b-dc2d-4258-83af-4deefe446dee

2. Set up your form

<form action="https://fwdform.herokuapp.com/user/<token>" method="post">
    Email: <input type="text" name="name"><br>
    Name: <input type="text" name="email"><br>
    Message: <textarea name="message" cols="40" rows="5"></textarea>
    <input type="submit" value="Send Message">
</form>

You can even run it on your own Heroku instance if you prefer not to trust a third-party service.

sdobson
  • 143
  • 1
  • 5
3

One solution is to use qontacto . it is a free contact form you can add to any website. it forwards you the messages.

Marcelo Biffara
  • 811
  • 4
  • 8
  • This is really nice, and works great on desktop. When running it on an iPhone safari though, the form doesn't show up for me. Is there any workaround for that, or is it just me perhaps? – Alper Akture Sep 01 '14 at 08:08
  • Hi Alper, on which site do you see it's not working? – Marcelo Biffara Sep 16 '14 at 16:50
  • It's a site I was developing for a client. I removed it since, but I just took the generated html, and added it a page per your instructions. And like I said, it's looks great in a browser on desktop. However, browsing that same page in Safari on an iPhone 4s (which is all I had available to try), the form does not show. I also had an android user report the same issue. I had removed the iframe and played with it a bit, and was able to get it to display, but have not gotten back to it to finish it up and push out that change yet. – Alper Akture Sep 17 '14 at 01:39
  • sorry to hear that, i have an android phone and it's working fine, i'll do some tests on iphone and other android devices! – Marcelo Biffara Sep 17 '14 at 03:53
  • ok, thanks, and I will add it to a test page again and send you the link. Could be some css conflict on my page perhaps. – Alper Akture Sep 17 '14 at 19:06
  • Is this website down @MarceloBiffara – Aniks Dec 29 '15 at 05:21
  • This site responds with 502 error. – ezze Apr 21 '17 at 09:35
2

There's a similar question here.

The solution was to point to a PHP file on a different server, one that isn't static. knittl shows how to point the action attribute to a different server.

<form method="post" action="http://example.com/process.php">
  <input type="text" name="my_textfield" />
  <input type="submit" value="send!" />
</form>

One other alternative would be to use Wufoo forms, which you can embed in a static page.

Community
  • 1
  • 1
derekdac
  • 91
  • 1
  • 2
1

I just found a new answer to this question (and actually i find it the best one in some cases):

You can use podio.com which is a free (up to 5 members in one organisation) ERP (Enterprise resource planning (ERP) systems integrate internal and external management information across an entire organization. (via wikipedia)), that allows creation of fully customizable webform, that can be added anywhere you wish. What's more, the input that your webform gathers can be easily managed: for example added into you contact list, added to tasks so you can check wether you or someone from your team handled enquiries. More on that here: http://blog.podio.com/2012/08/07/styleyourwebform/

some pros:

  • can be added anywhere you wish (you just have to specify subdomains its going to be used on)
  • you can customize form in minutes
  • you can add captcha (or some other spam protection) with one click
  • you can easily manage webform leads

cons:

  • youd have to create a podio acc for every client you want to set up webform for in order to avoid sharing confidential info
mmln
  • 2,104
  • 3
  • 24
  • 33
1

You can better use UserVoice contact form. Uservoice will do two things

  1. It will create new ticket inside Uservoice system.

  2. It also send a mail to you.

It will be end to end solutions for customer support. However if you send mail through some services, you have to communicate to your customer for support. Uservoice will designed and built for customer support only.

I know, you have a questions that you want to use your own custom form, not the one provided as uservoice widget. Yes, you can do it by

https://gist.github.com/cypriss/2032215

Fizer Khan
  • 88,237
  • 28
  • 143
  • 153
1

Another option would be to use an iframe to sneak your dynamic form into the site.

<iframe src="http://whatever.com/your-fancy-dynamic-form.php"></iframe>
Andrew Bacon
  • 546
  • 3
  • 6
  • 2
    Which you would need to host somewhere. The server doesn't seem to support PHP. Would you host your own contact form on another companies server possibly? – Smamatti Mar 02 '12 at 14:59
  • Gonna use iframe approach in my current project. This will save me a lot of time, and it'll be cheaper for my client aswell, as I can just apply an iframe with my djangoform to 10-100 static websites that can be stored on a different server :) /or should i not do this? – mmln Apr 24 '12 at 19:01
0

Another alternative is to use free hosted forms from a service such as Tectite. You push your forms to their service then they email you the results.

tatsuhirosatou
  • 25,149
  • 14
  • 39
  • 40
0

If you're using Octopress or Jekyll for your static site. You might want to check out jekyll-contact: https://github.com/anchetaWern/jekyll-contact It uses pooleapp for sending the contents of your contact form to an email you specify.

Wern Ancheta
  • 22,397
  • 38
  • 100
  • 139
0

The page can be static HTML, but your action can point to a PHP or similar file.

<form method="post" action="sendmail.php">
<textarea name="comments"></textarea>
<input type="submit" class="button" value="Send Feedback">
</form>
Andrew Bacon
  • 546
  • 3
  • 6