A5W_CHECKBOXES Function

Syntax

HTML_Input_Code as C = a5w_CheckBoxes(C choices ,C name [,C selected [,C style [,C orientation [,C events [,C id [,C separator [,L flagUseArraySyntaxForSingleChoice [,C class [,L flagDisabled [,C spanClass ]]]]]]]]]])

Arguments

HTML_Input_Code

Formatted HTML code ready to be inserted into a HTML check box array.

choices

A CR-LF delimited list of choices to appear in the HTML check box array. Choices can be in this format:

choice1
choice2
choice3
or
choice1|c1
choice2|c2
choice3|c3
Optionally, you can include a list of attributes following a final pipe.
choice1|c1|autocomplete="on" attribute2="off"
choice2|c2
choice3|c3
name

Optional. The value array that captures multiple selections.

selected

Optional. Default = "". The checked (default) value for the HTML check box array.

style

Optional. Default = "".

orientation

Optional. Default = "" (horizontal).

"Horizontal"
"Vertical "
"COLUMNS:LRTB:count"
"COLUMNS:TBLR:count"
where LRTB indicates that the choices snake from left-to-right, then top-to-bottom in <count> columns and TBLR indicates that the snaking direction is top-to-bottom, then left-to-right in <count> rows
events

Optional. Default = "".

id

Character

separator

Character

flagUseArraySyntaxForSingleChoice

Logical

class

Character

flagDisabled

Logical

spanClass

Character

Description

Generate code for Checkbox controls.

Discussion

The A5W_CHECKBOXES() function generates <INPUT TYPE="check box" CHECKED VALUE="display_value" NAME="value_array[]" display_value code for insertion into an HTML check box array.

Example

dim str as C
str = <<%a%
a
b
c
d
e
%a%
? a5w_check boxes(str,"fred","d")
= <input type="check box" value="a" name="fred[]" >a
<input type="check box" value="b" name="fred[]" >b
<input type="check box" value="c" name="fred[]" >c
<input type="check box" checked value="d" name="fred[]" >d
<input type="check box" value="e" name="fred[]" >e

Limitations

Web publishing applications only.

See Also