Nashville Web Design

Contact forms versus email links

Jul 09th   -   Articles, Snippets & Tutorials

The reason professional websites no longer include a simple email link is because of the overwhelming amount of SPAM you will receive.

The best way to receive messages is to provide a simple form with fields for their name, email address, and message. That form is then programmatically emailed to your address, but because no one sees your email, you cut down on the SPAM.

But don't forget to include form validation and human recognition--otherwise your back at square one. SPAM-bots can not only find an email link, they can also fill out your online forms. By requiring validated entries in you form field, you can block out alot of SPAM.

The next line of defense is to include a CAPTCHA. This is usually a squiggly word that you have to type in. The idea being that computers can't read an image version of a word.

But what if there was a better way? Why bother your site visitors with the extra step of trying to read a CAPTCHA? There is a way to filter out SPAM-bots without your visitors ever knowing they are being validated.

Try this method.

Start by creating a form that will not process. Point it to a bogus form handler for example in the "action" property of your form. Then, using JavaScript, add a click event to one of your fields. This click event should then alter the markup of the "action" property to point to the actual form handler. Now, when your page is viewed in a browser, the form will function as intended. Because your form requires someone actually clicking on it, the SPAM-bots have no way in.

Articles, Snippets & Tutorials

CALL (615) 200-8855