Subversion Repositories wimsdev

Rev

Rev 16698 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !! +exec+ +html+
  2. !goto end
  3. tit:formradio
  4. type:$type_exec
  5. alias:htmlradio
  6. syntax:!formradio ``name'' from ``n1'' to ``n2'' prompt ``promptlist''\
  7. !formradio ``name'' list ``selectlist'' prompt ``promptlist''
  8.  
  9. mean:Creates a radio button list menu under a previously defined html form. <br>\
  10.   This command speeds up the creation of radio buttoned menus, as well as simplifies\
  11.   the source files. In the parameters, ``name'' defines the name field of the menu, \
  12.   and the values of the menu are either integers going from ``n1'' to ``n2'' (in the first syntax),\
  13.   or items in the list ``selectlist''. <br>\
  14.   The optional parameter ``promptlist'' can be used to generate user prompts for each items in the list.\
  15.   If ``promptlist'' is empty or is shorter than ``selectlist'', the undefined prompts\
  16.   will be replaced by the value. If it is longer, the rest will be ignored.\
  17.   <br>\
  18.   The default of the menu will be the current value of the variable ``&#36;name''.\
  19.  An ``id'' is created automatically, except if the variable\
  20.   ``wims_ref_id'' is specified just before. If the variable\
  21.   ``wims_html_mode'' has a value as ``div'', ``li'', ``td'', the different items of\
  22.   the html form will be in the corresponding html environmment. If the\
  23.   variable ``wims_ref_class'' is non empty, the class of this html environment is the value \
  24.   of this variable. The default of the menu will be the current value of the variable\
  25.   ``&#36;name''. <br>\
  26.  The variables ``wims_ref_id'' and ``wims_html_mode'' are reinitialized after the html form.
  27. sample:see below
  28. :end
  29. <tr>
  30.   <td><code>!formradio quest1 list 0,1,2 prompt zero,one,two</code></td>
  31.   <td>
  32.     !formradio quest1 list 0,1,2 prompt zero,one,two
  33.   </td>
  34. </tr><tr>
  35.   <td><code>!formradio quest2 from 0 to 2 prompt A,B,C</code></td>
  36.   <td>
  37.     !formradio quest2 from 0 to 2 prompt A,B,C
  38.   </td>
  39. </tr><tr>
  40.   <td><code>!set wims_ref_id=quest3_0<br>!formradio quest3 list 0 prompt one choice</code></td>
  41.   <td>
  42.     !set wims_ref_id=quest3_0
  43.     !formradio quest3 list 0 prompt one choice
  44.   </td>
  45. </tr><tr>
  46.   <td><code>&lt;ol class="inline"&gt;<br>!set wims_html_mode=li
  47.   <br>!formradio varCHK3 list apple,pear prompt &amp;#x1f34e;,&amp;#x1f350;
  48.  <br>&lt;/ol&gt;
  49.   &lt;ul&gt;<br>!set wims_html_mode=li
  50.   <br>!formradio varCHK4 list apple,pear prompt &amp;#x1f34e;,&amp;#x1f350;
  51.  <br>&lt;/ul&gt;</code></td>
  52.   <td>
  53.     <ol class="inline">
  54.     !set wims_html_mode=li
  55.     !formradio varCHK3 list apple,pear prompt &#x1f34e;,&#x1f350;
  56.    </ol>
  57.     <ul>
  58.     !set wims_html_mode=li
  59.     !formradio varCHK4 list apple,pear prompt &#x1f34e;,&#x1f350;
  60.    </ul>
  61.   </td>
  62. </tr>
  63.