Checking for submitted form fields

Checking for submitted form fields

Write this code into .cfm page. Make the action of the form refer to this page and it will show you all of the fields that are being submitted.

Basically this sets all of the submitted form fields and values into a list then loops through the list of fields and values.

<cfloop index="thefield" list="#form.fieldnames#">
    <cfset fields=
"#thefield# = #evaluate(thefield)#">
    <cfoutput>
#fields#</cfoutput><br>
</cfloop>

All ColdFusion Tutorials By Author: D Evans
  • Dynamic Image Gallery
    You will be shown how to display the images in the desired number of columns and desired number of records per page with minimal coding. When the thumbnail image is clicked on it will open another window with the large image and image description under it.
    Author: D Evans
    Views: 39,648
    Posted Date: Sunday, December 8, 2002
  • Trouble Shooting Cookies that work for you, One Possibility
    I had had created a login that used cookies to give access to an area of the web site. The owner of the web site could not login to the area using Windows NT, but upon testing I could always login with my windows 98 system. I could not figure out why the NT system would not login, but I could. It seemed to be a coding error by the site owner, since other sites could be logged in to. Some time later I stumbled upon the answer.
    Author: D Evans
    Views: 21,667
    Posted Date: Monday, December 9, 2002
  • Frameless Frames in CF
    The appeal of frames and the continued use is -- to leave one constant item on a part of the page. However clever, they are a pain to code, setting targets and defining the columns and then there that scroll bar thing. Here is an easy way to create the illusion of frames on your page.
    Author: D Evans
    Views: 26,479
    Posted Date: Wednesday, December 11, 2002
  • Checking for submitted form fields
    This sets all of the submitted form fields and values into a list then loops through the list of fields and values.
    Author: D Evans
    Views: 25,620
    Posted Date: Friday, December 13, 2002
  • Make a generic email form processor
    This code will process any form submitted and email the submitted form fields excluding the submit, the redirect, the hidden, and the required fields; to the designated recipient.
    Author: D Evans
    Views: 26,855
    Posted Date: Friday, December 13, 2002
Download the EasyCFM.COM Browser Toolbar!