Another way that I prefer and use the most of the time is to check for the
#form.FIELDNAMES# first. Then just simply loop through the list of that
variable. FIELDNAMES always contains all the form variables except itself.
When listing just the whole form collection the item FIELDNAMES would be
listed too and in many cases that would not be our goal.
Ex.
<CFLOOP list="#form.FIELDNAMES#" index="FieldName">
<CFOUTPUT>
#FieldName# = #evaluate("form.#FieldName#")#<BR>
</CFOUTPUT>
</CFLOOP>
PS>> Get back to me if you're have any other problems or questions.
Rastislav Toscak
Senior Applications Developer
Computer Horizons Corp.
Tel : 973.884.5228
Fax : 973.884.5342
[EMAIL PROTECTED]
http://www.computerhorizons.com
-----Original Message-----
From: Suzanne Capener [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 09, 2001 9:57 AM
To: CF-Server
Subject: Re: A generic Form Field Listing
or, if the point is to just recieve the contents of
the form scope, you can use cf_objectdump custom tag
which would display all the form variables and their
values; of course, this does not allow you to control
the format in which it is displayed; it's a neat
little tag. In CF Server 5.0, a similar tag was
introduced called <CFDUMP var="#FORM#">. The cfdump
and cf_object dump will display the contents of many
different scopes such as query, session, form, url and
more.
;)
--- Jian Xu <[EMAIL PROTECTED]> wrote:
> <CFIF isdefined("form.submit")>
> <CFLOOP collection="#form#" item="locField">
> <CFOUTPUT>
> #locField# = #evaluate("form.#locField#")#<BR>
> </CFOUTPUT>
>
> </CFLOOP>
> </CFIF>
> <CFFORM action="#cgi.script_name#" method="POST"
> enablecab="Yes">First Name:
> <CFINPUT type="Text" name="fname"
> required="No"><BR>Last Name:
> <CFINPUT type="Text" name="lname" required="No"><BR>
> <INPUT type="Submit" name="submit"
> value="submit"></CFFORM>
>
> jian xu
> ----- Original Message -----
> From: Wesley Davidson <[EMAIL PROTECTED]>
> To: CF-Server <[EMAIL PROTECTED]>
> Sent: Wednesday, August 08, 2001 2:50 PM
> Subject: A generic Form Field Listing
>
>
> > hello,
> > I am working on generic form field script that
> will take any form on our
> > site and email me the contents of the variables.
> >
> > I know that there is a formfields list, or
> collection.
> >
> > I am sure that this is a simple for loop grabing
> formfield collection
> and
> > going through the formfield name and value
> properties.
> >
> > Can someone quick for loop example to do this.
> >
> > Thanks,
> > Wesley Davidson.
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com