|
Form Radio Button Custom Tag
Description
Requires ColdFusion 5 or greater.
FormRadio.cfm is a ColdFusion custom tag that creates a standard group of HTML form radio buttons from a field name and a list of values. Use of the <LABEL> tag allows the label to be clicked to select the radio button (in compliant browsers).
Syntax
<CF_FormRadio
FIELD="form field name"
VALUES="list of values"
[LABELS="list of labels"]
[SELECTED="selected value"]
[DELIM="list delimiter"]
[ALIGN="h|v"]
[ONCLICK="javascript"]
[COMPRESS="boolean"]
>
Attributes
| ALIGN |
|
(optional, string) |
|
Alignment of buttons: h = horizontal alignment (default), v = vertical alignment. |
| COMPRESS |
|
(optional, string) |
|
Remove all whitespace from generated code other than single spaces. Default is "YES". |
| DELIM |
|
(optional, string) |
|
Delimiter to use for lists. Default is a comma (","). |
| FIELD |
|
(REQUIRED, string) |
|
A valid HTML form field name for the radio button set. |
| LABELS |
|
(optional, string list) |
|
A delimited list of labels for the radio buttons. If provided, number of labels must equal number of values. If omitted, values are used as labels. |
| ONCLICK |
|
(optional, string) |
|
JavaScript to execute when a button is clicked. |
| SELECTED |
|
(optional, string) |
|
Value of the radio button to mark as selected. If omitted or not present in list of values, first value is used. |
| VALUES |
|
(REQUIRED, string list) |
|
A delimited list of values for the radio buttons. List must contain at least two items. If no labels are provided, these will also be used as labels. |
Examples
|