• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Validating Form Data

When you pass data, such as text fields, menu values, and hidden form fields, from a form page to an action page, you can evaluate and manipulate the data using ColdFusion tags and functions in the action page. For example, the following CFIF statement evaluates whether a form variable is equal to one. If it is, a message is displayed confirming that fact. If it is not, another message is displayed:

<cfif form.var EQ 1> 
    You passed one. 
    <cfelse> 
    You did not pass one. 
</cfif> 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint