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
  • 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: 15,883
    Posted Date: Friday, December 13, 2002
  • 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: 23,242
    Posted Date: Sunday, December 8, 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: 16,111
    Posted Date: Wednesday, December 11, 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: 17,694
    Posted Date: Friday, December 13, 2002