Hi David.
Marc Campeau offered up the following solution (thanks again Marc)....
<CFLOOP INDEX="formField" LIST="#structKeyList(FORM)#">
<CFIF compareNoCase( formField, "FIELDNAMES" )>
<CFSET qryString = listAppend( qryString,
"#formField#=#URLEncodedFormat( evaluate( 'FORM.#formField#' ) )#", "&" ) >
</CFIF>
</CFLOOP>
And Dimitri Abramov offered up this one (thanks again Dimitri)....
<cfset cgistring="">
<cfloop index="field" list="#form.fieldnames#">
<cfset tmp = field & '=' & evaluate('#field#')>
<cfset cgistring = ListAppend(cgistring, tmp, "&")>
</cfloop>
Both do the trick.
Cheers,
Karl
> From: "Dave Boehm" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Fri, 26 Apr 2002 15:53:13 -0400
> To: <[EMAIL PROTECTED]>
> Subject: [CFTALKTor] Looping over a form
>
> I have an action page on which I'd like to loop through a passed form
> and get the names and values of each form element. I don't know how many
> form elements there may be or what their names are but I do know the
> name of the form. I can do this in Javascript (I believe) but is it
> possible in ColdFusion?
>
>
> David Boehm
> Website & Database Management
> Product Ordering On-Line
> M&T Printing Group
> 907 Frederick St. Kitchener, ON Canada
> N2B 2B9
> (519) 571-0101 Fax (519) 571-0129
> [EMAIL PROTECTED]
>
>
>
-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "A. Karl Zarudny" <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)