SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form not validating (Help!)

    http://www.ternionform.com/temp1111/
    can someone explain why its not validating? I tried fixing it but I think its something minimal I'm missing..I see that the break tags aren't valid so not talkin about those.. but the other 49 errors.
    Thx

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're using an HTML syntax on your XHTML document's INPUT elements. Add a space and / before the > on your input tags - that'll clear most of the errors up.

    You're also using fieldsets, which require legends to be used as well. You also have to associate your labels with your inputs with the ID attribute on the input matching the label's for attribute.

  3. #3
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thx! fixed all but 1 error is there somethin else I should use instead of fieldset? I'm tryin to get my form like this
    Code:
    first and last name
    address
    address2
    city
    state zip country
    phone 
    email
    checkboxes

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fieldset is the proper element for dividing up sections of a form. The required legend element acts like a heading for that section of the form.

    But to fix your error, put the "zip" ID attribute value inside the empty ID attribute that's associated with the label's for attribute with the same value. (In other words, make sure label for="zip" and input id="zip" match up instead of having that input's ID attribute be blank.)


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
  •