What if you prefix the form fields with a number and underscore for the order you want them in:

1_FirstName
2_LastName
3_Address1


and so on.

-----Original Message-----
From: Ray Champagne [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 09, 2004 4:23 PM
To: CF-Talk
Subject: RE: getting all form fields?

Okay, got all the form fields, but now they are all output in a jumbled
order.  Does anyone know how they put into the list?  It isn't alpha, and I
can't find any other common thread.  This form handler needs to service
several forms, so forcing an output order won't work, since I don't know
what the forms elements will be all the time.  And formatting them using
ListSort won't work either.  What I would like is to have the fields output
in the same order that I put them in (the html page), so that LastName
follows FirstName, Adderess1 follows that, Address2 follows that, etc.

Any ideas?

Ray

  At 11:09 AM 6/9/2004, Dave Phillips wrote:
>Ray,
>
>form.fieldnames is a comma delimited list of all field names submitted
>through the form.
>
>You can loop through that variable and get all field names.  To display
>their values you would do something like this:
>
><CFLOOP LIST="#form.fieldnames#" INDEX="item">
>     <cfoutput>#Evaluate("form." & item)#</cfoutput>
></CFLOOP>
>
>Sincerely,
>
>Dave Phillips
>National Marketing Director
>Legacy for Life
>615-746-3851
>[EMAIL PROTECTED]
>
>
>________________________________
>
>From: Ray Champagne [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, June 09, 2004 9:47 AM
>To: CF-Talk
>Subject: getting all form fields?
>
>
>I am trying to set up a FormMail-like script to generically handle
>contact
>forms, etc.  I know there is a way to get all submitted form fields, I
>just
>forget what it is...any help?
>
>Like HTTP_FORM_FIELDS or something like that....
>
>TIA,
>
>Ray
>
>=============================================
>Ray Champagne - Senior Application Developer
>CrystalVision Web Site Design and Internet Services
>603.433.9559
>www.crystalvision.org
>=============================================
>
>The information contained in this transmission (including any attached
>files) is CONFIDENTIAL and is intended only for the person(s) named
>above. If you received this transmission in error, please delete it
>from your system and notify us immediately. If you are not an intended
>recipient, please note that any use or dissemination of the information
>contained in this transmission (including any attached files) and the
>copying, printing, or retransmission of that information is strictly
>prohibited. You can notify us by return email or by phone at
>603.433.9559.
>Thank you.
>
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to