Tags · Functions · Objects
Lucee Tag Reference
Choose a tag:

Tag <CFFORM>

Builds a form with CFML custom control tags that provide more functionality than standard HTML form input elements (XML and Flash type not supported).

Body

This tag must have a body.

Example

	<cfform
		[accept="string"]
		[acceptcharset="string"]
		[accessible="boolean"]
		[action="string"]
		[archive="string"]
		[class="string"]
		[codebase="string"]
		[dir="string"]
		[enablecab="boolean"]
		[enctype="string"]
		[format="string"]
		[height="string"]
		[id="string"]
		[lang="string"]
		[method="string"]
		[name="string"]
		[onclick="string"]
		[ondblclick="string"]
		[onerror="string"]
		[onkeydown="string"]
		[onkeypress="string"]
		[onkeyup="string"]
		[onload="string"]
		[onmousedown="string"]
		[onmousemove="string"]
		[onmouseout="string"]
		[onmouseover="string"]
		[onmouseup="string"]
		[onreset="string"]
		[onsubmit="string"]
		[passthrough="any"]
		[preloader="boolean"]
		[preservedata="boolean"]
		[scriptsrc="string"]
		[skin="string"]
		[style="string"]
		[target="string"]
		[timeout="number"]
		[title="string"]
		[width="string"]
		[wmode="string"]>

	</cfform>

Attributes

The attributes for this tag are fixed. Except for the following attributes no other attributes are allowed.
Name Type Required Description
accept string No passed through to form tag created, only used for type html. 
acceptcharset string No passed through to form tag created, only used for type html. 
accessible boolean No Specifies whether to include support screen readers
in the Flash form. Screen reader support adds
approximately 80KB to the SWF file sent to the
client. Default is: false. 
action string No The name of the page that executed when the form is submitted for processing. 
archive string No URL for a downloadable Java classes for controls. 
class string No passed through to form tag created, only used for type html. 
codebase string No URL for a downloadable JRE plugin (for Internet explorer only). Default is
/CFIDE/classes/cf-j2re-win.cab. 
dir string No passed through to form tag created, only used for type html. 
enablecab boolean No This Attribute is deprecated 
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. 
format string No passed through to form tag created, only used for type html. 
height string No The height of the form. Use a number to specify
pixels, In Flash, you can use a percentage value to
specify a percentage of the available width. The
displayed height might be less than the specified size. 
id string No HTML id passed through to form tag created, only used for type html. 
lang string No passed through to form tag created, only used for type html. 
method string No other than post will ignored 
name string No A name for the form you are creating. 
onclick string No passed through to form tag created, only used for type html. 
ondblclick string No passed through to form tag created, only used for type html. 
onerror string No The name of a JavaScript function that runs if a form submission fails. 
onkeydown string No passed through to form tag created, only used for type html. 
onkeypress string No passed through to form tag created, only used for type html. 
onkeyup string No passed through to form tag created, only used for type html. 
onload string No JavaScript to execute when the form loads. 
onmousedown string No passed through to form tag created, only used for type html. 
onmousemove string No passed through to form tag created, only used for type html. 
onmouseout string No passed through to form tag created, only used for type html. 
onmouseover string No passed through to form tag created, only used for type html. 
onmouseup string No passed through to form tag created, only used for type html. 
onreset string No JavaScript to execute when the user clicks a reset button. 
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 
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. 
preloader boolean No Specifies whether to display a progress bar when
loading the Flash form. Default is: true. 
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. 
scriptsrc string No Specifies the URL, relative to the web root, of the
directory that contains the cfform.js file with the
client-side JavaScript used by this tag and its child
tags. For XML format forms, this directory is also the
default directory for XSLT skins. 
skin string No  
style string No Styles to apply to the form. In HTML or XML format,
Lucee passes the style attribute to the browser
or XML. In Flash format, must be a style specification
in CSS format (XML and Flash type no supported). 
target string No The name of the window or window frame to which the form output is sent. 
timeout number No Integer number of seconds for which to keep the
form data in the Flash cache on the server. A value of
0 prevents the data from being cached. 
title string No passed through to form tag created, only used for type html. 
width string No The width of the form. Use a number to specify
pixels, In Flash, you can use a percentage value to
specify a percentage of the available width. 
wmode string No Specifies how the Flash form appears relative to
other displayable content that occupies the same
space on an HTML page.
- window: The Flash form is the topmost layer on the
page and obscures anything that would share the
space, such as drop-down dynamic HTML lists.
- transparent: The Flash form honors the z-index of
dhtml so you can float items above it. If the Flash
form is above any item, transparent regions in the
form show the content that is below it.
- opaque: The Flash form honors the z-index of
dhtml so you can float items above it. If the Flash
form is above any item, it blocks any content that is
below it.
Default is: window.