How to Dump Form Variables in ColdFusion

Save

In any platform of dynamic web development, it frequently becomes necessary to debug your scripts by ensuring that the values that are being passed to a page by a form are the same values that the page is working with when attempting to run its own processes. Development with Adobe ColdFusion is no exception. Fortunately, it is possible to easily view a .CFM module's active variables on the screen with one of ColdFusion's built-in tags.

  • Open the page that is the action target of the form you are debugging.

  • Immediately after the opening <body> tag, insert the following:

    <cfdump var = "#variable#">

    Substitute the form variable you are testing for the word variable. Be sure to keep the quotes and pound signs in place.

  • Repeat the two tags for every form variable you wish to dump. When you are finished, save and publish the page.

  • Submit the form you are testing on your ColdFusion server. You will see what, if any, values are being passed to the page for each form variable.

References

  • Photo Credit Comstock/Comstock/Getty Images
Promoted By Zergnet

Comments

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!