1HTML::FormFu::Element::UCsoemrboCBoonxt(r3i)buted Perl DHoTcMuLm:e:nFtoartmiFoun::Element::ComboBox(3)
2
3
4
6 HTML::FormFu::Element::ComboBox - Select / Text hybrid
7
9 ---
10 elements:
11 - type: ComboBox
12 name: answer
13 label: 'Select yes or no, or write an alternative:'
14 values:
15 - yes
16 - no
17
19 Creates a multi element containing a Select field and a Text field.
20
21 A ComboBox element named "foo" would result in a Select menu named
22 "foo_select" and a Text field named "foo_text". The names can instead
23 be overridden by the "name" value in "select" and "text".
24
25 If a value is submitted for the Text field, this will be used in
26 preference to any submitted value for the Select menu.
27
28 You can access the submitted value by using the ComboBox's name:
29
30 my $value = $form->param_value('foo');
31
33 default
34 If the value matches one of the Select menu's options, that options
35 will be selected. Otherwise, the Text field will use the value as its
36 default.
37
38 options
39 See "options" in HTML::FormFu::Element::_Group for details.
40
41 values
42 See "values" in HTML::FormFu::Element::_Group for details.
43
44 value_range
45 See "value_range" in HTML::FormFu::Element::_Group for details.
46
47 empty_first
48 See "empty_first" in HTML::FormFu::Element::_Group for details.
49
50 empty_first_label
51 See "empty_first_label" in HTML::FormFu::Element::_Group for details.
52
53 select
54 Arguments: \%setting
55
56 Set values effecting the Select menu. Known keys are:
57
58 name
59
60 Override the auto-generated name of the select menu.
61
62 text
63 Arguments: \%setting
64
65 Set values effecting the Text field. Known keys are:
66
67 name
68
69 Override the auto-generated name of the select menu.
70
72 Although this element inherits from HTML::FormFu::Element::Block, its
73 behaviour for the methods filter/filters, constraint/constraints,
74 inflator/inflators, validator/validators and transformer/transformers
75 is more like that of a field element, meaning all processors are added
76 directly to the date element, not to its child elements.
77
78 This element's get_elements and get_all_elements are inherited from
79 HTML::FormFu::Element::Block, and so have the same behaviour. However,
80 it overrides the "get_fields|HTML::FormFu/get_fields" method, such that
81 it returns both itself and its child elements.
82
84 Is a sub-class of, and inherits methods from
85 HTML::FormFu::Element::Multi, HTML::FormFu::Element::Block,
86 HTML::FormFu::Element
87
88 HTML::FormFu
89
91 Carl Franks, "cfranks@cpan.org"
92
94 This library is free software, you can redistribute it and/or modify it
95 under the same terms as Perl itself.
96
97
98
99perl v5.12.1 2010-06-24HTML::FormFu::Element::ComboBox(3)