<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>
Requires Extension: Form Tags
<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
onerror=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
><!--- body ---></cfform>
Unimplemented Attribute(s)
Attribute | Description |
---|---|
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. This has not yet been implemented https://luceeserver.atlassian.net/browse/LDEV-1171 * unimplemented * |
enablecab
boolean,
optional
|
This attribute has been deprecated and is non-functional. * deprecated * |
skin
string,
optional
|
* unimplemented * |
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. * unimplemented * |
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. * unimplemented * |
preloader
boolean,
optional
|
Specifies whether to display a progress bar when loading the Flash form. Default is: true. * unimplemented * |
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. * unimplemented * |
wmode
string,
optional
|
Specifies how the Flash form appears relative to other displayable content that occupies the same space on an HTML page.
Default is: window. * unimplemented * |
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. * unimplemented * |
Examples
<cfform name="mycfform">
-- year --
<br />
<cfselect name="year" enabled=true style="color:blue;" size=2>
<option name="0" selected=true>--2024--</option>
<option name="1">--2023--</option>
<option name="3">--2022--</option>
<option name="2">--2021--</option>
</cfselect> <br />
-- color --
<br />
<cfselect name="color" >
<option name="0">--red--</option>
<option name="1">--green--</option>
<option name="2">--blue--</option>
</cfselect>
</cfform>
See also
- Ajax features
- <cfinput>
- <cfselect>
- <cfslider>
- <cftextarea>
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)