1HTML::FormFu::Element::UCsoemrboCBoonxt(r3i)buted Perl DHoTcMuLm:e:nFtoartmiFoun::Element::ComboBox(3)
2
3
4

NAME

6       HTML::FormFu::Element::ComboBox - Select / Text hybrid
7

VERSION

9       version 2.07
10

SYNOPSIS

12           ---
13           elements:
14             - type: ComboBox
15               name: answer
16               label: 'Select yes or no, or write an alternative:'
17               values:
18                 - yes
19                 - no
20

DESCRIPTION

22       Creates a multi element containing a Select field and a Text field.
23
24       A ComboBox element named "foo" would result in a Select menu named
25       "foo_select" and a Text field named "foo_text". The names can instead
26       be overridden by the "name" value in "select" and "text".
27
28       If a value is submitted for the Text field, this will be used in
29       preference to any submitted value for the Select menu.
30
31       You can access the submitted value by using the ComboBox's name:
32
33           my $value = $form->param_value('foo');
34

METHODS

36   default
37       If the value matches one of the Select menu's options, that options
38       will be selected. Otherwise, the Text field will use the value as its
39       default.
40
41   options
42       See "options" in HTML::FormFu::Role::Element::Group for details.
43
44   values
45       See "values" in HTML::FormFu::Role::Element::Group for details.
46
47   value_range
48       See "value_range" in HTML::FormFu::Role::Element::Group for details.
49
50   empty_first
51       See "empty_first" in HTML::FormFu::Role::Element::Group for details.
52
53   empty_first_label
54       See "empty_first_label" in HTML::FormFu::Role::Element::Group for
55       details.
56
57   select
58       Arguments: \%setting
59
60       Set values effecting the Select menu. Known keys are:
61
62       name
63
64       Override the auto-generated name of the select menu.
65
66   text
67       Arguments: \%setting
68
69       Set values effecting the Text field. Known keys are:
70
71       name
72
73       Override the auto-generated name of the select menu.
74

CAVEATS

76       Although this element inherits from HTML::FormFu::Element::Block, its
77       behaviour for the methods filter/filters, constraint/constraints,
78       inflator/inflators, validator/validators and transformer/transformers
79       is more like that of a field element, meaning all processors are added
80       directly to the date element, not to its child elements.
81
82       This element's get_elements and get_all_elements are inherited from
83       HTML::FormFu::Element::Block, and so have the same behaviour. However,
84       it overrides the "get_fields|HTML::FormFu/get_fields" method, such that
85       it returns both itself and its child elements.
86

SEE ALSO

88       Is a sub-class of, and inherits methods from
89       HTML::FormFu::Element::Multi, HTML::FormFu::Element::Block,
90       HTML::FormFu::Element
91
92       HTML::FormFu
93

AUTHOR

95       Carl Franks, "cfranks@cpan.org"
96

LICENSE

98       This library is free software, you can redistribute it and/or modify it
99       under the same terms as Perl itself.
100

AUTHOR

102       Carl Franks <cpan@fireartist.com>
103
105       This software is copyright (c) 2018 by Carl Franks.
106
107       This is free software; you can redistribute it and/or modify it under
108       the same terms as the Perl 5 programming language system itself.
109
110
111
112perl v5.32.0                      2020-07-28HTML::FormFu::Element::ComboBox(3)
Impressum