SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2005
    Location
    Palo Alto, CA
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question jquery contact form + validation

    Nicely presented in jfiddle: http://jsfiddle.net/Yf4AS/

    in the HTML section I placed the php file as well just so you could have a look.

    what's the problem?
    everything! validation isn't working and the mail() function isn't working!

    Thanks for your help!

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,192
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Please see the updated jsFiddle which has working validation and valid HTML markup now, when using the jQuery validation plugin the required class alone won't cause the validation to kick in which the demos and documentation clearly show. To get the validation working the easiest way is to define the fields in the rules and messages properties in the options object.

    http://jsfiddle.net/chrisupjohn/Yf4AS/1/

    Also i would highly recommend you check over your CSS as you have over used a lot of the properties which can be converted to shorthand properties which will reduce about a third of your overall code.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2005
    Location
    Palo Alto, CA
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the help! yeah, the css was just a copy/paste from inspect-element. I cleaned it up a bit but I still don't have validation working:

    http://jsfiddle.net/kfKTn/1/


    As you might notice, I stopped trying to use the jquery validation and just went with what the tutorial originally said to go with. I figure once I get eveything working only then should I try to fix it up with the jquery validation i want.

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2005
    Location
    Palo Alto, CA
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind... my selector wasn't working.... Thanks for looking!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •