A5W_RADIOBUTTONS Function

Syntax

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

Arguments

HTML_Input_Code

Formatted HTML code ready to be inserted into a HTML radio button array.

choices

A CR-LF delimited list of choices to appear in the HTML radio button 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 selected (default) value for the HTML radio button 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

class

Character

flagDisabled

Logical

spanClass

Character

Description

Used to generate radio buttons for an A5 Web page.

Discussion

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

Example

dim aa as C
aa =<<%str%
a
b
c
d
e
f
%str%
dim fred[1] as C
? a5w_radiobuttons(aa,fred[1],"b")
= <input type="radio" value="a" name="" >a
<input type="radio" checked value="b" name="" >b
<input type="radio" value="c" name="" >c
<input type="radio" value="d" name="" >d
<input type="radio" value="e" name="" >e
<input type="radio" value="f" name="" >f

Limitations

Web publishing applications only.

See Also