Contents

cfform

Description

Builds a form with CFML custom control tags that provide more functionality than standard HTML form input elements.

Category

Other

Implemented

Usage Syntax

<cfform  
	[name="String"]
	[action="String"]
	[preserveData="Boolean"]
	[enableCAB="Boolean"]
	[target="String"]
	[method="String"]
	[encType="String"]
	[passThrough="Any"]
	[codeBase="String"]
	[archive="String"]
	[scriptSrc="String"]
	[id="String"]
	[onReset="String"]
	[onLoad="String"]
	[onSubmit="String"]
	[style="String"]
	[class="String"]
	[format="String"]
	[skin="String"]
	[width="String"]
	[height="String"]
	[preloader="Boolean"]
	[timeout="number"]
	[wMode="String"]
	[accessible="Boolean"]
	[accept="String"]
	[acceptcharset="String"]
	[title="String"]
	[dir="String"]
	[lang="String"]
	[onclick="String"]
	[ondblclick="String"]
	[onmousedown="String"]
	[onmouseup="String"]
	[onmouseover="String"]
	[onmousemove="String"]
	[onmouseout="String"]
	[onkeypress="String"]
	[onkeyup="String"]
	[onkeydown="String"]
 />

[] = Optional attribute

Attributes

Name Type Required Default Description
name String No A name for the form you are creating.
action String No The name of the ColdFusion page that executed when the form is submitted for processing.
preserveData Boolean No Optional. "Yes" or "No." Specifies whether to display the data that was entered into cfform controls in the action page. "Yes" resets the value of the control to the value submitted when the form is submitted to itself. This works as expected for the cftextinput and cfslider controls. This attribute can be used only if the form and action are on a single page, or if the action page has a form that contains controls with the same names as the corresponding controls on the form page.
enableCAB Boolean No This attribute has been deprecated and is non-functional.
target String No The name of the window or window frame to which the form output is sent.
method String No other than post will ignored
encType String No The MIME type used to encode data sent by the POST method. The default value is application/x-www-form-urlencoded. It is recommended that you accept the default value. This attribute is included for compatibility with the HTML form tag.
passThrough Any No Used for HTML attributes that are not explicitly supported by cfform. If you specify an attribute and value, they are passed to the HTML code that is generated for the cfinput tag.
codeBase String No URL for a downloadable JRE plugin (for Internet exploroer only). Default is /CFIDE/classes/cf-j2re-win.cab.
archive String No URL for a downloadable Java classes for ColdFusion controls. Default is /CFIDE/classes/CFJava2.jar.
scriptSrc String No
id String No
onReset String No
onLoad String No
onSubmit String No JavaScript function to execute after other input validation returns. Use this attribute to execute JavaScript for preprocessing data before the form is submitted
style String No
class String No
format String No
skin String No
width String No
height String No
preloader Boolean No
timeout number No
wMode String No
accessible Boolean No
accept String No
acceptcharset String No
title String No
dir String No
lang String No
onclick String No
ondblclick String No
onmousedown String No
onmouseup String No
onmouseover String No
onmousemove String No
onmouseout String No
onkeypress String No
onkeyup String No
onkeydown String No

Example Usage