By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,269 Members | 1,506 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,269 IT Pros & Developers. It's quick & easy.

How to sort form field data in E-mail?

P: n/a
I have a simple fill-out form with three fields, in this order: Name,
E-mail, and Comment. But when I receive the E-mail containing the form data,
the fields are listed backwards (Comment, E-mail, Name).

I've checked the CGI file, and it doesn't appear to control the sort order.
Is there a way to tell the HTML code to sort the field data for E-mail?
Dec 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Yeah wrote:
I have a simple fill-out form with three fields, in this order: Name,
E-mail, and Comment.
It would be better to announce your E-mail address, assuming you wish to
have useful communication. For just sending a free-format message,
fill-out forms are clumsier to use than even the most primitive E-mail
program. They can be occasionally useful still as an _additional_
possibility, since the user cannot always use an E-mail client.
But when I receive the E-mail containing the form data,
the fields are listed backwards (Comment, E-mail, Name).
It depends on the script. It has nothing to do with HTML.
I've checked the CGI file, and it doesn't appear to control the sort order.
Then why don't you make it do so, if the order matters to you.
Is there a way to tell the HTML code to sort the field data for E-mail?


HTML code does nothing. It is data. Browsers are supposed to create the
form data set in the order in which fields appear in HTML code, but it
would be quite unnecessary to rely on browsers getting this right.
Anyway, what happens after the form data has been sent is quite external
to HTML.
Dec 21 '05 #2

P: n/a
__/ [Jukka K. Korpela] on Wednesday 21 December 2005 15:11 \__
Yeah wrote:
I have a simple fill-out form with three fields, in this order: Name,
E-mail, and Comment.


It would be better to announce your E-mail address, assuming you wish to
have useful communication. For just sending a free-format message,
fill-out forms are clumsier to use than even the most primitive E-mail
program. They can be occasionally useful still as an _additional_
possibility, since the user cannot always use an E-mail client.

Good thinking, but I would like to point out that contact forms are
frequently used to prevent spam (one could argue that the contrary is true).
Also, the advantage to using E-mail is thatany sender (can) gets the
outgoing messages archived, just in case it bounces or needs to be re-used.

But when I receive the E-mail containing the form data,
the fields are listed backwards (Comment, E-mail, Name).


It depends on the script. It has nothing to do with HTML.
I've checked the CGI file, and it doesn't appear to control the sort
order.


Then why don't you make it do so, if the order matters to you.

I'd suggest just using a different script. There are plenty. If the order of
fields is a terrible issue at all...

Is there a way to tell the HTML code to sort the field data for E-mail?


HTML code does nothing. It is data. Browsers are supposed to create the
form data set in the order in which fields appear in HTML code, but it
would be quite unnecessary to rely on browsers getting this right.
Anyway, what happens after the form data has been sent is quite external
to HTML.

You could fool the script/users by changing the HTML labels adjacent the
boxes. That would be a terrible idea that'll just mess up the labels in your
E-mail and break field validation, e.g. E-mail address, message length.

Roy
Dec 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.