You can ensure that a variable exists by using the cfparam tag, which tests for the variable's existence and optionally supplies a default value if the variable does not exist. The cfparam tag has the following syntax:
<cfparam name="VariableName" type="data_type" default="DefaultValue">
There are two ways to use the cfparam tag to test for variable existence, depending on how you want the validation test to proceed:
The following example shows how to use the cfparam tag to check for the existence of an optional variable and to set a default value if the variable does not already exist:
<cfparam name="Form.Contract" default="Yes">