Working with Form Variables

A form variable's name is the name that you assigned to the form control on the form page.

Refer to form variable by name within tags, functions and other expressions on an action page.

Because form variables extend beyond the local page - their scope is the action page, prefix them with form. to explicitly tell ColdFusion that you are referring to a form variable.

Note Note:Checkboxes and radio buttons do not pass to action pages unless they are enabled on a form. In fact, if you try to reference these variables on the action page, you will receive an error if they are not present.

Usage example

For example this code references the LastName form variable for output on an action page: