Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output all FORM fields 1

Status
Not open for further replies.

iqof188

IS-IT--Management
Nov 9, 2000
228
GB
Yeah, I know, debug output will do the same, but this piece of code is for those who just want to see the form variables that have been passed. Paste the following code in your action page and there you go:

<cfoutput>
<table>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<cfloop list=&quot;#FORM.fieldnames#&quot; index=&quot;item&quot;>
<tr>
<td>#item#</td>
<td>#Evaluate(&quot;FORM.#item#&quot;)#</td>
</tr>
</cfloop>
</table>
</cfoutput>


<webguru>iqof188</webguru>
 
The &quot;same&quot; thing can be accomplished on CF 4.5+ with:

<cfloop collection=&quot;#Form#&quot; item=&quot;ThisField&quot;>
<cfoutput>
#ThisField# equals #Form[ThisField]#<br>
</cfoutput>
</cfloop>
 
Nice one CFHUB!


<webguru>iqof188</webguru>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top