HTML::...:Input(3pm)
HTML::FormFu::Role::Element::Input π
okay bestie, welcome to the HTML::FormFu::Role::Element::Input page (she lives in the HTML::...:Input(3pm) manpage slot, iykyk) π
β¨ VERSION β¨
version 2.07 β yeah she's been around, and she's still iconic π¦
πΈ DESCRIPTION πΈ
So basically?? This is the base-class for a whole lil squad of input elements. Not me listing the entire friend group but here we go, she's the mother of:
HTML::FormFu::Element::ButtonHTML::FormFu::Element::CheckboxHTML::FormFu::Element::FileHTML::FormFu::Element::HiddenHTML::FormFu::Element::PasswordHTML::FormFu::Element::RadioHTML::FormFu::Element::Text
that's the roster, no cap π
π METHODS π
datalist_options
Arguments: none
Arguments: \@options
okay so use datalist_options or datalist_values to generate a HTML5-compatible datalist group of option tags β¨ This gets associated with the input element via a list attribute on the input tag. it's giving teamwork fr.
the datalist ID attribute must be set using either datalist_id or auto_datalist_id. like, non-negotiable bestie π
---
elements:
- type: Text
name: foo
options:
- [ 01, January ]
- [ 02, February ]
- [ 03, March ]
- [ 04, April ]
the syntax is similar to options in HTML::FormFu::Role::Element::Group, except hash-ref items only accept value and label keys (and their variants). the way that's so specific of her π«Ά
if you pass no arguments, she returns an arrayref of the currently set datalist options. cute right?
her arguments must be an array-ref of items. each item may be an array ref of the form [ $value, $label ] or a hash-ref of the form { value => $value, label => $label }.
when you're using the hash-ref construct, the label_xml and label_loc variants of label are supported, and so are the value_xml and value_loc variants of value. slay π
datalist_values
Arguments: \@values
---
elements:
- type: Radiogroup
name: foo
values:
- jan
- feb
- mar
- apr
a more concise alternative to datalist_options. lowkey the low-effort version and we love her for it πΈ
her arguments must be an array-ref of values. the labels used are the result of ucfirst($value). that's it, that's the whole vibe.
datalist_id
Arguments: [$string]
sets the datalist ID attribute, and automatically sets this input element's list ID to the same. two birds, one attribute β¨
either datalist_id or auto_datalist_id is required, if either datalist_options or datalist_values are set. don't skip this step bestie, she will notice π
auto_datalist_id
see auto_datalist_id in HTML::FormFu for details. go read the other page, it's a whole thing π
π ATTRIBUTE ACCESSORS π
get / set input attributes directly with these methods. direct communication, we stan π«Ά
Arguments: [$string]
Return Value: $string
altautocompletecheckedmaxlengthpatternplaceholdersize
π₯ BOOLEAN ATTRIBUTE ACCESSORS π₯
Arguments: [$bool]
Return Value: $self Return Value: $string Return Value: undef
get / set boolean XHTML attributes such as required="required".
if you give her any true argument, the attribute value gets set equal to the attribute key name. e.g. $element->required(1) will set the attribute required="required". periodt π
if you give her a false argument, the attribute key gets deleted. gone. ghosted. π
when used as a setter, the return value is $self to allow chaining. chain her, she loves it π
autofocusmultiplerequired
π¦ SEE ALSO π¦
is a sub-class of, and inherits methods from HTML::FormFu::Role::Element::Field, HTML::FormFu::Element
HTML::FormFu
π AUTHOR π
Carl Franks, cfranks@cpan.org
π LICENSE π
this library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
π AUTHOR π
Carl Franks <cpan@fireartist.com>
β COPYRIGHT AND LICENSE β
this software is copyright (c) 2018 by Carl Franks.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page bestie, you ate π β¨
perl v5.28.1 Β· 2019-01-12 β mwah, love u, go build something gorgeous π¦ππΈ
π¦ where this page comes from
- debian bookworm: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms