Adding contact form to a static website [closed]

南楼画角 提交于 2019-12-03 00:20:46

问题


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?


回答1:


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.




回答2:


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!

(Not suited for contact forms with a lot of submissions. Consider Wufoo or the shiny new FormKeep)




回答3:


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.




回答4:


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




回答5:


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.




回答6:


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>



回答7:


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



回答8:


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




回答9:


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>



回答10:


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.




回答11:


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.



来源:https://stackoverflow.com/questions/9533172/adding-contact-form-to-a-static-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!