Form field order

Discussion in 'ASP General' started by Aaron Bertrand [MVP], Apr 3, 2004.

  1. Did you try it out? I'm pretty sure they will be in the order they appear,
    but that might be affected if you use tabindex for example, or if you have
    other form elements between those with the same name.

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/


    "Bob Lehmann" <> wrote in message
    news:...
    >I know that the order of from fields from a form post are somewhat random.
    > But, what about fields that have the same name -
    >
    > <input type="text" name="something" value=""> First Choice
    > <input type="text" name="something" value=""> Second Choice
    > <input type="text" name="something" value=""> Third Choice
    > <input type="text" name="something" value=""> Fourth Choice
    >
    > First = "bananna"
    > Second = "orange"
    > Third = ""
    > Fourth = "apple"
    >
    > Will the values, in the delimited list contained in
    > Request.Form("something"), always be in the order they are in the form?
    > That
    > is - bananna, orange, , apple
    >
    >
    > Thanks,
    > Bob Lehmann
    >
    >
    >
    Aaron Bertrand [MVP], Apr 3, 2004
    #1
    1. Advertising

  2. Aaron Bertrand [MVP]

    Bob Lehmann Guest

    I know that the order of from fields from a form post are somewhat random.
    But, what about fields that have the same name -

    <input type="text" name="something" value=""> First Choice
    <input type="text" name="something" value=""> Second Choice
    <input type="text" name="something" value=""> Third Choice
    <input type="text" name="something" value=""> Fourth Choice

    First = "bananna"
    Second = "orange"
    Third = ""
    Fourth = "apple"

    Will the values, in the delimited list contained in
    Request.Form("something"), always be in the order they are in the form? That
    is - bananna, orange, , apple


    Thanks,
    Bob Lehmann
    Bob Lehmann, Apr 3, 2004
    #2
    1. Advertising

  3. Aaron Bertrand [MVP]

    Bob Lehmann Guest

    Yes, I tried it quite a few times - just double checking.

    It appears that the order of the values IS maintained in the delimited list.
    There are no tabindexes set, and no fields in between.

    Thanks.

    Bob


    "Aaron Bertrand [MVP]" <> wrote in message
    news:%...
    > Did you try it out? I'm pretty sure they will be in the order they

    appear,
    > but that might be affected if you use tabindex for example, or if you have
    > other form elements between those with the same name.
    >
    > --
    > Aaron Bertrand
    > SQL Server MVP
    > http://www.aspfaq.com/
    >
    >
    > "Bob Lehmann" <> wrote in message
    > news:...
    > >I know that the order of from fields from a form post are somewhat

    random.
    > > But, what about fields that have the same name -
    > >
    > > <input type="text" name="something" value=""> First Choice
    > > <input type="text" name="something" value=""> Second Choice
    > > <input type="text" name="something" value=""> Third Choice
    > > <input type="text" name="something" value=""> Fourth Choice
    > >
    > > First = "bananna"
    > > Second = "orange"
    > > Third = ""
    > > Fourth = "apple"
    > >
    > > Will the values, in the delimited list contained in
    > > Request.Form("something"), always be in the order they are in the form?
    > > That
    > > is - bananna, orange, , apple
    > >
    > >
    > > Thanks,
    > > Bob Lehmann
    > >
    > >
    > >

    >
    >
    Bob Lehmann, Apr 3, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page