FORM elements - Name & ID - are both of these necessary.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • divina11
    New Member
    • Aug 2007
    • 55

    FORM elements - Name & ID - are both of these necessary.

    Why do we need to use Name and ID elements in a FORM tag? Why can't I just use ID, which will be easier?

    Cheers
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    'name' is for backwards compatibility only. Just use 'id'.

    Comment

    • gregerly
      Recognized Expert New Member
      • Sep 2006
      • 192

      #3
      Originally posted by drhowarddrfine
      'name' is for backwards compatibility only. Just use 'id'.
      Drhowarddrfine,

      If you do not include a name for an input field, will the ID be available in the post or get array? I've never tried that, but I thought that in input fields, the name is what becomes available in the post array.

      Thanks,

      greg

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        For the input tag, yes. But he asked about the <form> element.

        Comment

        • gregerly
          Recognized Expert New Member
          • Sep 2006
          • 192

          #5
          Originally posted by drhowarddrfine
          For the input tag, yes. But he asked about the <form> element.
          Gotcha....thank s for pointing that out.

          Greg

          Comment

          • divina11
            New Member
            • Aug 2007
            • 55

            #6
            Thank you guy's, cheers

            Comment

            Working...