Why not adopt me?
NAME
HTML::Widget::Plugin::Input - the most basic input widget
VERSION
version 0.201
SYNOPSIS
$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,
});
DESCRIPTION
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.
my $plugin = HTML::Widget::Factory::Input->new({
default_classes => [ qw(foo bar) ],
});
METHODS
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:
- value
-
This is the widget's initial value.
- type
-
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.
AUTHOR
Ricardo SIGNES
COPYRIGHT AND LICENSE
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.