WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: I am looking to purchase form code that has spam blockandis accessible.

for

From: Jared Smith
Date: Feb 6, 2009 11:45AM


You can download the basic code for what we use at
http://webaim.org/temp/spamdetection.txt You can also try it out at
http://webaim.org/temp/spamdetection.php It doesn't actually send
mail, so play all you want.

A few notes:

- This is PHP, but could easily be duplicated in any other scripting language.

- Be sure to change the $sendto address at the top to your e-mail address.

- This is not fool-proof, but will stop almost all spam sent to your
site by bots.

- On our live sites, we use scripting to set focus directly to the
feedback messages. We also use scripting and tabindex="-1" so that the
error links set focus directly to the relevant form fields.

Jared Smith
WebAIM