<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).

This tag must have a body.

This tag is also supported within <cfscript>

Attribute Description
skin
string, optional
onmouseover
string, optional

passed through to form tag created, only used for type html.

acceptcharset
string, optional

passed through to form tag created, only used for type html.

onmousemove
string, optional

passed through to form tag created, only used for type html.

scriptsrc
string, optional

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.

enablecab
boolean, optional

This attribute has been deprecated and is non-functional.

style
string, optional

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).

codebase
string, optional

URL for a downloadable JRE plugin (for Internet explorer only). Default is /CFIDE/classes/cf-j2re-win.cab.

passthrough
any, optional

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.

onreset
string, optional

JavaScript to execute when the user clicks a reset button.

width
string, optional

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.

onmousedown
string, optional

passed through to form tag created, only used for type html.

dir
string, optional

passed through to form tag created, only used for type html.

accept
string, optional

passed through to form tag created, only used for type html.

archive
string, optional

URL for a downloadable Java classes for controls.

name
string, optional

A name for the form you are creating.

enctype
string, optional

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.

class
string, optional

passed through to form tag created, only used for type html.

timeout
number, optional

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.

onclick
string, optional

passed through to form tag created, only used for type html.

format
string, optional

passed through to form tag created, only used for type html.

preloader
boolean, optional

Specifies whether to display a progress bar when loading the Flash form. Default is: true.

method
string, optional

other than post will ignored

height
string, optional

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.

onerror
string, optional

The name of a JavaScript function that runs if a form submission fails.

onmouseup
string, optional

passed through to form tag created, only used for type html.

onkeydown
string, optional

passed through to form tag created, only used for type html.

wmode
string, optional

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.

accessible
boolean, optional

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.

preservedata
boolean, optional

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.

onsubmit
string, optional

JavaScript function to execute after other input validation returns. Use this attribute to execute JavaScript for preprocessing data before the form is submitted

lang
string, optional

passed through to form tag created, only used for type html.

id
string, optional

HTML id passed through to form tag created, only used for type html.

onmouseout
string, optional

passed through to form tag created, only used for type html.

onload
string, optional

JavaScript to execute when the form loads.

target
string, optional

The name of the window or window frame to which the form output is sent.

onkeyup
string, optional

passed through to form tag created, only used for type html.

onkeypress
string, optional

passed through to form tag created, only used for type html.

action
string, optional

The name of the page that executed when the form is submitted for processing.

title
string, optional

passed through to form tag created, only used for type html.

ondblclick
string, optional

passed through to form tag created, only used for type html.

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

Examples

There are currently no examples for this tag.

See also