http://club.coolmaps.com
tomorrow's fusion today

CFPARAM - setting default values
Cold Fusion doesn't like values to not exist. Enter a very handy tag called CFPARAM.

Consider the CheckBox in a form. It can only pass a checked value. What if the user doesn't want it checked? Cold Fusion won't like that. It requires an 'unchecked' value too!

CFPARAM looks like:

<CFPARAM NAME="Parameter Name" Default="default value">

What CFPARAM says to Cold Fusion is 'If a value for 'Parameter Name' doesn't exist, use the Default one here'.

We've set the checked value of the CheckBox to 'box was checked'. CFPARAM on the following page will set the unchecked default value.

Submit the form without checking the box.

 

to home page
CF Workshop intro CFERROR and application.cfm CFFORM - auto javascript validation CFPARAM - setting default values CFIF - required fields CFIF - creating conditional code
 
member of club xChange
downloads contact us site map