Protecting HTML Forms from Spam with JavaScript

If you are looking for a quick way to avoid automated form spam on existing forms, you may want to try this simple JavaScript form spam protection trick. You won’t get a level of form protection (and usability) comparable to what you would get with FormSmarts, but then you can implement the trick on any existing forms, irrespective of the form handler you are currently using.

We plan to offer the ability to use FormSmarts as a form spam filter for third-party forms within a few months. This will effectively allow users of other form processors to benefit from FormSmarts’ form spam protection on their existing HTML forms, with very little change. Details and availability will be advertised here.

3 Responses to “Protecting HTML Forms from Spam with JavaScript”

What are the usability implications of using JavaScript to protect my forms against automated postings? Don’t all browsers in use today support JavaScript?

Posted by: Erica | Feb 12th, 2008 11:45 am

Erica,
Even if all desktop browsers support JavaScript, some user disable JavaScript to prevent possible web exploits like rogue redirections or cross-site scripting. That is sometimes a corporate policy over which individual users have no choice.
There are also concerns with mobile users. Not all web-capable cellphones support JavaScript at this time. And since Internet data transfer over mobile networks is expensive and typically charged per megabyte, there are rational reasons to disable JavaScript on JavaScript-enabled handsets like BlackBerry or iPhone smartphones.

People using FormSmarts to power their web forms expect our forms to be usable by anyone, so we use JavaScript to enhance form submission experience, but JavaScript is not required to submit a form.

FormSmarts Posted by: FormSmarts | Feb 14th, 2008 9:49 am

Here is a quick trick. Any legitimate browser that doesn’t support JS will show the content of tags. So can just explain there why JavaScript is required to submit a form. That may be just what you need for a small website.

Posted by: Jeff | May 29th, 2008 10:54 pm

Leave a Reply

About the Form Builder Blog

The Online Form Builder Blog is published by FormSmarts, a web form service providing all you need to create a form and publish it online in minutes. FormSmarts makes it easy to build a form and embed it on your site. You can then get form submissions by email or store them on FormSmarts and download an Excel report. Learn more about the many other benefits of FormSmarts.