tit:formradio
type:$type_exec
alias:htmlradio
syntax:!formradio ``name'' from ``n1'' to ``n2'' prompt ``promptlist''\
!formradio ``name
'' list ``selectlist
'' prompt ``promptlist
''
mean
:Creates a radio button
list menu under a previously
defined html form
. <br
>\
This command speeds up the creation of radio buttoned menus, as well as simplifies\
the source files. In the parameters, ``name'' defines the name field of the menu, \
and the values of the menu are either integers going from ``n1'' to ``n2'' (in the first syntax),\
or items in the
list ``selectlist
''. <br
>\
The optional parameter ``promptlist
'' can be used to generate user prompts
for each items in the
list.\
If ``promptlist
'' is
empty or is shorter than ``selectlist
'', the undefined prompts\
will be replaced by the value. If it is longer, the rest will be ignored.\
<br>\
The
default of the menu will be the
current value of the variable ``
$name''.\
An ``id'' is created automatically, except if the variable\
``wims_ref_id'' is specified just before. If the variable\
``wims_html_mode'' has a value as ``div'', ``li'', ``td'', the different items of\
the html form will be in the corresponding html environmment. If the\
variable ``wims_ref_class
'' is non
empty, the
class of this html environment is the value \
of this variable
. The
default of the menu will be the
current value of the variable\
``$name''. <br>\
The variables ``wims_ref_id'' and ``wims_html_mode'' are reinitialized after the html form.
sample:see below
<tr>
<td
><code
>!formradio quest1
list 0,1,2 prompt zero
,one
,two
</code
></td
>
<td>
!formradio quest1
list 0,1,2 prompt zero
,one
,two
</td>
</tr><tr>
<td><code>!formradio quest2 from 0 to 2 prompt A,B,C</code></td>
<td>
!formradio quest2 from 0 to 2 prompt A,B,C
</td>
</tr><tr>
<td
><code
>!set wims_ref_id
=quest3_0
<br
>!formradio quest3
list 0 prompt one choice
</code
></td
>
<td>
!set wims_ref_id=quest3_0
!formradio quest3
list 0 prompt one choice
</td>
</tr><tr>
<td><code><ol class="inline"><br>!set wims_html_mode=li
<br
>!formradio varCHK3
list apple
,pear prompt
&
;#x1f34e;,&#x1f350;
<br></ol>
<ul><br>!set wims_html_mode=li
<br
>!formradio varCHK4
list apple
,pear prompt
&
;#x1f34e;,&#x1f350;
<br></ul></code></td>
<td>
<ol class="inline">
!set wims_html_mode=li
!formradio varCHK3
list apple
,pear prompt
🍎,🍐
</ol>
<ul>
!set wims_html_mode=li
!formradio varCHK4
list apple
,pear prompt
🍎,🍐
</ul>
</td>
</tr>