Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

TuckBodi

macrumors 6502
Original poster
Jan 10, 2007
388
0
I'm in a time crunch and need to come up with a contact us form for a web page and I'm looking for one using PHP, Ajax and Captcha (image verification). With the Ajax (& Javascript) part I want to be able to validate the required fields, post the info from the form without leaving the page, then clear the fields and post a message above everything if it was successful (or error out if not).

Sounds straightforward and I've found some out there which do some of these but not all. Anybody have any ideas of anything out there, preferably free/open source?

Thx
 
Well, seems this ajax contact form is exactly what you are looking for. Unfortunately it's not free - $10 annual subscription. Their contact page is a demonstration of the working contact form. Hope this was useful at least a little bit.
 
This wouldn't be overly hard to write, especially if you start from someone else's solution. I have a version that validates with JavaScript before submitting, uses textual captcha, but no AJAX (though runs with a single PHP file). I wouldn't want to use AJAX the way you're suggesting. Just seems unnecessary.

I prefer a textual captcha over an image one because it's more accessible to those with disabilities.
 
This wouldn't be overly hard to write, especially if you start from someone else's solution. I have a version that validates with JavaScript before submitting, uses textual captcha, but no AJAX (though runs with a single PHP file). I wouldn't want to use AJAX the way you're suggesting. Just seems unnecessary.

I prefer a textual captcha over an image one because it's more accessible to those with disabilities.

Where exactly would you use AJAX then? I'm not looking to argue, but curious as I always thought that examples like these are the perfect places to use AJAX.
 
Where exactly would you use AJAX then? I'm not looking to argue, but curious as I always thought that examples like these are the perfect places to use AJAX.

Off the top of my head some good AJAX I've seen is Google Suggest (auto completion that talks to a server database) and the way Yahoo Mail makes use of it. Google Reader also does a good job pulling in RSS updates in the background.

The example here isn't necessarily a bad place for AJAX, just not one I'd be comfortable with. It's kind of a usability concern. The user submits, then the form goes blank and the users goes AHHH! and perhaps doesn't see the "submitted successfully" message. Not seeing it in action though, this may not be a huge concern. I also hope that the form works with JavaScript disabled.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.