Click here to get back home

How to sort form field data in E-mail?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How to sort form field data in E-mail? Yeah 12-21-2005
Get Chitika Premium
Posted by Yeah on December 21, 2005, 9:03 am
Please log in for more thread options


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?



Posted by Jukka K. Korpela on December 21, 2005, 5:11 pm
Please log in for more thread options


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.

Posted by Roy Schestowitz on December 23, 2005, 4:52 am
Please log in for more thread options


__/ [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

Similar ThreadsPosted
Prepopulating form field August 24, 2006, 3:32 am
Restoring OTHER form field after submit September 23, 2005, 1:43 am
Is there a way to enter text into an HTML Form edit field January 29, 2005, 5:42 pm
Dynamic width of a text input field in a form November 8, 2005, 6:35 am
retrieving data from a form August 28, 2004, 6:21 pm
Loss of Form field contents when the browser BACK button is pressed November 25, 2004, 4:57 pm
Adding Web form data to a new row of an excel file February 14, 2005, 8:51 am
tools for handling form to e-mail data June 10, 2005, 4:50 pm
Way to save form data locally w/o server? August 17, 2007, 7:23 pm
Converting HTML Form Data into Webpage Output ? January 17, 2005, 1:06 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap