Remember that the form scope is a struct, so you can loop over the struct:
<cfif structKeyExists(form, "fieldnames")>
<cfoutput>
<cfloop collection = "form" item = "i">
<!--- if you don't want form.fieldnames outputed --->
<cfif i neq "fieldNames">
#i#: #form[i]#<br />
</cfif>
</cfloop>
<cfoutput>
</cfif>
larry
>Try this instead:
>
><cfif structKeyExists(form, "fieldnames")>
><cfoutput>
> <cfloop list="#form.fieldnames#" index="i">
> #i# = #form[i]#<br />
> </cfloop>
></cfoutput>
></cfif>
>
>Chris Peterson
>
>I haven't tried the code (could be typos) but this should be close.
>
><cfloop list="#form.fieldnames#" index="thisField">
><cfoutput>#thisField# = #evaluate("form.#thisField#")#</cfoutput><br/>
></cfloop>
>
>
>
>I've got to put an employment application online and email this. Other
>then
>cfdump'ing it to an email is there any easy way to dump all the form
>fields.
>Already tried a mailto cgi script and it wasn't working as well as I
>hoped.
>Any php tag or other cf solution out there?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:249212
Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5