Adobe ColdFusion 8

Form variable notes and considerations

When using form variables in an action page, keep the following guidelines in mind:

  • A form variable is available on the action page and pages that it includes.
  • Prefix form variables with "Form." when referencing them on the action page.
  • Surround variable values with number signs (#) for output.
  • Variables for check boxes, radio buttons, and list boxes with size attributes greater than 1 only get passed to the action page if you select an option. Text boxes, passwords, and textarea fields pass an empty string if you do not enter text.
  • An error occurs if the action page tries to use a variable that was not passed.
  • If multiple controls have the same name, one form variable is passed to the action page with a comma-delimited list of values.
  • You can validate form variable values on the client or the server.