1HTMLDocument.addOptionList(3kaKyaay)a module referHeTnMcLeDocument.addOptionList(3kaya)
2
3
4

NAME

6       HTMLDocument::addOptionList - Adds a set of checkboxes or radio buttons
7

SYNOPSIS

9       ElementTree  addOptionList(  ElementTree  parent, String legend, String
10       iname, [SelectOption] options, Bool allowmultiple=true )
11

ARGUMENTS

13       parent The parent element
14
15       legend The legend for the fieldset grouping the options
16
17       iname The name of the option controls.  Remember  that  names  starting
18       with "kaya_" may be used by the Kaya standard library and should not be
19       used directly by applications.
20
21       options The options to select from
22
23       allowmultiple This parameter is optional and defaults to true  ,  which
24       generates  the  option list as a set of checkboxes. If it is explicitly
25       set to false then radio buttons are used instead.
26

DESCRIPTION

28       Adds a set of checkboxes or radio buttons to a form. The meaning of the
29       parameters  is  very similar or identical to the similar parameters for
30       HTMLDocument.addLabelledSelect (3kaya) , but  the  appearance  is  very
31       different.  If  the  number  of options is not large, this is generally
32       considerably easier to use than a selection drop-down, although it does
33       take up much more screen space.
34
35       When  using  this function to generate radio buttons, you should ensure
36       that one of the options is initially  selected,  as  browser  behaviour
37       when  no  option is selected is variable and often causes problems. You
38       may need to add a "no option selected" radio button for initial  selecā€
39       tion in some circumstances.
40
41
42    options = [
43        SelectOption("Express delivery","1",true),
44        SelectOption("Standard delivery","2",false),
45        SelectOption("Slow delivery","3",false)
46    ];
47    sel = addLabelledSelect(fieldset,"Select a delivery speed","choice",
48                            options,false);
49    /* // produces
50    <fieldset><legend>Select a delivery speed</legend>
51      <div><input type='checkbox' name='choice' value='1' id='Kay1'
52                        checked='checked'>
53        <label for='Kay1'>Express delivery</label></div>
54      <div><input type='checkbox' name='choice' value='2' id='Kay2'>
55        <label for='Kay2'>Standard delivery</label></div>
56      <div><input type='checkbox' name='choice' value='3' id='Kay3'>
57        <label for='Kay3'>Slow delivery</label></div>
58    </fieldset>
59    */ // exact markup may vary slightly to keep IDs unique in the document
60

AUTHORS

62       Kaya   standard  library  by  Edwin  Brady,  Chris  Morris  and  others
63       (kaya@kayalang.org). For further information see http://kayalang.org/
64

LICENSE

66       The Kaya standard library is free software;  you  can  redistribute  it
67       and/or  modify  it  under  the  terms  of the GNU Lesser General Public
68       License (version 2.1 or any later version) as  published  by  the  Free
69       Software Foundation.
70
72       HTMLDocument.SelectOption (3kaya)
73       HTMLDocument.addLabelledSelect (3kaya)
74       HTMLDocument.addOption (3kaya)
75
76
77
78Kaya                             December 2010HTMLDocument.addOptionList(3kaya)
Impressum