-
-
14 Dec 2018 16:07:11 UTC
- Distribution: HTML-FormFu
- Module version: 2.07
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (12)
- Testers (555 / 4 / 25)
- Kwalitee
Bus factor: 1- 80.07% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (334.11KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Carp
- Class::MOP::Method
- Clone
- Config::Any
- Cwd
- Data::Visitor
- Data::Visitor::Callback
- DateTime
- DateTime::Format::Builder
- DateTime::Format::Natural
- DateTime::Format::Strptime
- DateTime::Locale
- Email::Valid
- Encode
- Exporter
- Fatal
- File::Copy
- File::Find
- File::ShareDir
- File::Spec
- File::Temp
- HTML::Scrubber
- HTML::TokeParser::Simple
- HTTP::Headers
- Hash::Flatten
- IO::File
- JSON::MaybeXS
- List::MoreUtils
- List::Util
- Locale::Maketext
- Module::Pluggable
- Moose
- Moose::Role
- Moose::Util
- MooseX::Aliases
- MooseX::Attribute::Chained
- Number::Format
- Path::Class::File
- Readonly
- Regexp::Common
- Scalar::Util
- Storable
- Task::Weaken
- YAML::XS
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- NAME
- VERSION
- DESCRIPTION
- METHODS
- ATTRIBUTE ACCESSORS
- BOOLEAN ATTRIBUTE ACCESSORS
- SEE ALSO
- AUTHOR
- LICENSE
- AUTHOR
- COPYRIGHT AND LICENSE
NAME
HTML::FormFu::Role::Element::Input - Role for input fields
VERSION
version 2.07
DESCRIPTION
Base-class for HTML::FormFu::Element::Button, HTML::FormFu::Element::Checkbox, HTML::FormFu::Element::File, HTML::FormFu::Element::Hidden, HTML::FormFu::Element::Password, HTML::FormFu::Element::Radio, HTML::FormFu::Element::Text.
METHODS
datalist_options
Arguments: none
Arguments: \@options
Use either "datalist_options" or "datalist_values" to generate a HTML5-compatible
datalist
group ofoption
tags. This will be associated with theinput
element via alist
attribute on theinput
tag.The
datalist
ID attribute must be set using either "datalist_id" or "auto_datalist_id".--- 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
andlabel
keys (and their variants).If passed no arguments, it returns an arrayref of the currently set datalist options.
Its 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 using the hash-ref construct, the
label_xml
andlabel_loc
variants oflabel
are supported, as are thevalue_xml
andvalue_loc
variants ofvalue
.datalist_values
Arguments: \@values
--- elements: - type: Radiogroup name: foo values: - jan - feb - mar - apr
A more concise alternative to "datalist_options".
Its arguments must be an array-ref of values. The labels used are the result of
ucfirst($value)
.datalist_id
Arguments: [$string]
Sets the
datalist
ID attribute, and automatically sets thisinput
element'slist
ID to the same.Either "datalist_id" or "auto_datalist_id" is required, if either "datalist_options" or "datalist_values" are set.
auto_datalist_id
See "auto_datalist_id" in HTML::FormFu for details.
ATTRIBUTE ACCESSORS
Get / set input attributes directly with these methods.
Arguments: [$string]
Return Value: $string
alt
autocomplete
checked
maxlength
pattern
placeholder
size
BOOLEAN ATTRIBUTE ACCESSORS
Arguments: [$bool]
Return Value: $self Return Value: $string Return Value: undef
Get / set boolean XHTML attributes such as
required="required"
.If given any true argument, the attribute value will be set equal to the attribute key name. E.g.
$element->required(1)
will set the attributerequired="required"
.If given a false argument, the attribute key will be deleted.
When used as a setter, the return value is
$self
to allow chaining.autofocus
multiple
required
SEE ALSO
Is a sub-class of, and inherits methods from HTML::FormFu::Role::Element::Field, HTML::FormFu::Element
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.
Module Install Instructions
To install HTML::FormFu, copy and paste the appropriate command in to your terminal.
cpanm HTML::FormFu
perl -MCPAN -e shell install HTML::FormFu
For more information on module installation, please visit the detailed CPAN module installation guide.