A slightly improved AJAX contact form

This package is the work of Brett Terpstra. It is hereby released into the public domain, where most of the code was stolen from. Credits belong to Dustin Diaz, Dagon Design, Peter Tornstrand, Axentric, Bad Behavior and a few others that served as references but I didn't actually steal their code.

The javascript and PHP are a mess. This is not an official release. The ultimate goal is to make it modular and more readily able to accept any type of form using classes to control validation types. It can do this to a certain extent but is poorly documented. If you have received this file, it was by special request and in the hopes that you will take the time to make something useful from it. If you do, please let me know!

My goal in doing this was to create an unobtrusive, standards compliant, degradable and secure contact form. It has a ways to go in all of these areas. I used "Bad Behavior" to handle spambots because Captcha affected accessibility. The degradability is questionable depending on the context that the form is used in, as it takes some tweaking of the containing file to make things work smoothly. And it doesn't function very well with CSS disabled, but it is possible. It works fine with javascript disabled, given the aforementioned tweaks are made. I would someday like to make it into a WordPress plugin, but as you can tell from the source, my programming skills are in their infant stages.

This form has been tested with just about every browser I could get my hands on. I would appreciate bug reports, including PHP version and browser name/version/os. Thanks, and I hope this does somebody some good!

 

Brett Terpstra
www.circlesixdesign.com
blog.circlesixdesign.com
brett [at] circlesixdesign [dot] com


P.S. If you do enjoy (or have complaints about) this contact form, I'd love to hear about it on my blog. Nobody ever posts comments on my blog. So come and help get a conversation going! The main post for the contact form is here.