HTML::Widget::Plugin::Input - the most basic input widget
version 0.204
$widget_factory->input({ id => 'flavor', # if "name" isn't given, id will be used for name size => 25, value => $default_flavor, });
...or...
$widget_factory->hidden({ id => 'flavor', # if "name" isn't given, id will be used for name value => $default_flavor, });
This plugin provides a basic input widget.
The default_classes attribute may be used to add a default class to every produced input. This class cannot be overridden.
default_classes
my $plugin = HTML::Widget::Factory::Input->new({ default_classes => [ qw(foo bar) ], });
provided_widgets
This plugin provides the following widgets: input, hidden
input
This method returns a basic one-line text-entry widget.
In addition to the generic HTML::Widget::Plugin attributes, the following are valid arguments:
This is the widget's initial value.
This is the type of input widget to be created. You may wish to use a different plugin, instead.
hidden
This method returns a hidden input that is not displayed in the rendered HTML. Its arguments are the same as those to input.
This method may later be factored out into a plugin.
build
my $widget = $class->build($factory, $arg);
This method does the actual construction of the input based on the args collected by the widget-constructing method. It is primarily here for subclasses to exploit.
Ricardo SIGNES
This software is copyright (c) 2005 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install HTML::Widget::Factory, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Widget::Factory
CPAN shell
perl -MCPAN -e shell install HTML::Widget::Factory
For more information on module installation, please visit the detailed CPAN module installation guide.