1HTML::FormFu::Role::EleUmseenrt:C:oInntpruitb(u3t)ed PerHlTMDLo:c:uFmoernmtFaut:i:oRnole::Element::Input(3)
2
3
4

NAME

6       HTML::FormFu::Role::Element::Input - Role for input fields
7

VERSION

9       version 2.07
10

DESCRIPTION

12       Base-class for HTML::FormFu::Element::Button,
13       HTML::FormFu::Element::Checkbox, HTML::FormFu::Element::File,
14       HTML::FormFu::Element::Hidden, HTML::FormFu::Element::Password,
15       HTML::FormFu::Element::Radio, HTML::FormFu::Element::Text.
16

METHODS

18   datalist_options
19       Arguments: none
20
21       Arguments: \@options
22
23       Use either "datalist_options" or "datalist_values" to generate a
24       HTML5-compatible "datalist" group of "option" tags. This will be
25       associated with the "input" element via a "list" attribute on the
26       "input" tag.
27
28       The "datalist" ID attribute must be set using either "datalist_id" or
29       "auto_datalist_id".
30
31           ---
32           elements:
33             - type: Text
34               name: foo
35               options:
36                 - [ 01, January ]
37                 - [ 02, February ]
38                 - [ 03, March ]
39                 - [ 04, April ]
40
41       The syntax is similar to "options" in
42       HTML::FormFu::Role::Element::Group, except hash-ref items only accept
43       "value" and "label" keys (and their variants).
44
45       If passed no arguments, it returns an arrayref of the currently set
46       datalist options.
47
48       Its arguments must be an array-ref of items. Each item may be an array
49       ref of the form "[ $value, $label ]" or a hash-ref of the form "{ value
50       => $value, label => $label }".
51
52       When using the hash-ref construct, the "label_xml" and "label_loc"
53       variants of "label" are supported, as are the "value_xml" and
54       "value_loc" variants of "value".
55
56   datalist_values
57       Arguments: \@values
58
59           ---
60           elements:
61             - type: Radiogroup
62               name: foo
63               values:
64                 - jan
65                 - feb
66                 - mar
67                 - apr
68
69       A more concise alternative to "datalist_options".
70
71       Its arguments must be an array-ref of values. The labels used are the
72       result of "ucfirst($value)".
73
74   datalist_id
75       Arguments: [$string]
76
77       Sets the "datalist" ID attribute, and automatically sets this "input"
78       element's "list" ID to the same.
79
80       Either "datalist_id" or "auto_datalist_id" is required, if either
81       "datalist_options" or "datalist_values" are set.
82
83   auto_datalist_id
84       See "auto_datalist_id" in HTML::FormFu for details.
85

ATTRIBUTE ACCESSORS

87       Get / set input attributes directly with these methods.
88
89       Arguments: [$string]
90
91       Return Value: $string
92
93   alt
94   autocomplete
95   checked
96   maxlength
97   pattern
98   placeholder
99   size

BOOLEAN ATTRIBUTE ACCESSORS

101       Arguments: [$bool]
102
103       Return Value: $self Return Value: $string Return Value: undef
104
105       Get / set boolean XHTML attributes such as "required="required"".
106
107       If given any true argument, the attribute value will be set equal to
108       the attribute key name. E.g. "$element->required(1)" will set the
109       attribute "required="required"".
110
111       If given a false argument, the attribute key will be deleted.
112
113       When used as a setter, the return value is $self to allow chaining.
114
115   autofocus
116   multiple
117   required

SEE ALSO

119       Is a sub-class of, and inherits methods from
120       HTML::FormFu::Role::Element::Field, HTML::FormFu::Element
121
122       HTML::FormFu
123

AUTHOR

125       Carl Franks, "cfranks@cpan.org"
126

LICENSE

128       This library is free software, you can redistribute it and/or modify it
129       under the same terms as Perl itself.
130

AUTHOR

132       Carl Franks <cpan@fireartist.com>
133
135       This software is copyright (c) 2018 by Carl Franks.
136
137       This is free software; you can redistribute it and/or modify it under
138       the same terms as the Perl 5 programming language system itself.
139
140
141
142perl v5.32.1                      2021-01-H2T7ML::FormFu::Role::Element::Input(3)
Impressum