According to the W3C, "The control names/values are listed in the
order they appear in the document."

http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1

But that doesn't say anything about the server side...

Relying on the field order is a mark of sloppy programming IMHO.But
maybe there are corner cases when handling a series of checkboxes with
the same name is easier if the values are given in the order they were
found in the form.

Regards,
Nicolas

2005/11/28, Jim Gallacher <[EMAIL PROTECTED]>:
> Gregory (Grisha) Trubetskoy wrote:
> >
> > On Mon, 28 Nov 2005, Nicolas Lehuen wrote:
> >
> >> Why is the ordering so important ? I do understand we need to support
> >> multiple values per field name, but I don't see why ordering is
> >> needed.
> >
> >
> > I think that it may be dictated by some RFC (the stdlib does it this way
> > too), I'm not sure, but it's a good question though, it'd be great to
> > have it researched and answered so that we don't have to go over this
> > point again.
> >
> > Grisha
> >
> >
>
> Ordering is not defined according to my interpretation. But at the same
> time we shouldn't mess with the ordering. Gotta love those RFCs. :)
>
> http://www.ietf.org/rfc/rfc2388.txt?number=2388
>
> Returning Values from Forms:  multipart/form-data
>
> 5.5 Ordered fields and duplicated field names
>
>     The relationship of the ordering of fields within a form and the
>     ordering of returned values within "multipart/form-data" is not
>     defined by this specification, nor is the handling of the case where
>     a form has multiple fields with the same name. While HTML-based forms
>     may send back results in the order received, and intermediaries
>     should not reorder the results, there are some systems which might
>     not define a natural order for form fields.
>
> Jim
>

Reply via email to