UPDATED 2/23/2010

Here I am, over a year later, shaking my head at my bulky code. Here is the updated, much more lightweight, drop-in AJAX contact form. It now uses JQuery, the JQuery Forms Plugin, and the JQuery Validation Plugin instead of Scriptaculous and WForms. The page loads much faster than before, and the source is about 1/3rd of the size.

Installation instructions: Unzip to your directory, modify the two variables in “config.php” to your liking, and you should be up and running right away! Feel free to use and modify however you like. Just add the class = “required” tag to any fields that you want to make sure are filled out before submitting the form. More advanced validation options can be found at http://docs.jquery.com/Plugins/Validation. If you happen to throw me a comment here showing it in action, I’d be happy to link to your site in this post!

Download (ver 1.6): whs_ajax_contact_form_1.6.zip (39.7KB)
Download (ver 1.5): whs_ajax_contact_form_1.5.zip (34.4KB)
CHANGELOG:
1.6: Updated to JQuery 1.4
Fixed several issues with validation and submission
1.5: Reworked with JQuery
1.01: Fixed a php tag.

View the form in action at http://www.whathuhstudios.com/contact.php.

History (depreciated):

Download (ver 1.01): whs_ajax_contact_form_1.01.zip (93.2KB)

More information for developers:

I did some searching online for a quick and easy AJAX contact form… There isn’t one. The free ones are two years old and don’t work, and the other ones I saw cost money. So I fixed the problem.

This is a pretty basic form that uses Scriptalicious Scriptaculous(already included), and WForms (also already included). Scriptalicious is in there for some of the fancy dynamic effects. They aren’t over the top in any way, but just a little bit to class it up. The WForms has a validation routine that makes sure required fields are filled out. I left it in there so that you can ad fields to your liking. Just add the class = “required” tag to any fields that you want to make sure are filled out before submitting the form.

Credit for (version 1.01) codebase: http://www.jeffpipas.com/

Tags: , , , ,



Reader's Comments

  1. Blog Me I’m famous » 16 exemples et sources de formulaires Ajax | October 25th, 2008 at 9:27 am

    [...] Contact Form With Script.aculo.us & WForms – Demo [...]

  2. 16+ Ücretsiz Ajax İletişim Formu | Batuhan Bulak | October 26th, 2008 at 10:04 am

    [...] Contact Form With Script.aculo.us & WForms | Demo [...]

  3. Drop-In Ajax Contact Form Updated | whathuh studios rant | February 26th, 2009 at 8:48 pm

    [...] just updated http://www.whathuhstudios.com/press/2008/01/04/ajax-contact-form-quick-install/ to version 1.5, [...]

  4. grdg | July 22nd, 2009 at 8:57 am

    nice site!!!

  5. Gopal Raju | October 6th, 2009 at 11:57 am

    Validation doesn’t work

  6. Daniel Costalis | October 9th, 2009 at 6:45 am

    @Gopal Raju

    Uh…. yes it does.

    If you’re having any issues, I’d be happy to help with them if you leave more specific details as to what problems you’re having.

  7. J | October 11th, 2009 at 10:47 pm

    its not validating for me either.. even tried uploading the folder directly from download.. when none of the fields filled and i click on the submit button it still gives me the thank you message

  8. Gopal Raju | December 5th, 2009 at 3:01 am

    When I click the submit button without filling the form fields, it shows the “Thank you” message.

Leave a Comment

Powered by WP Hashcash

Subscribe without commenting