# @(#)$Ident: Textfield.pm 2013-05-16 14:20 pjf ;
package
HTML::FormWidgets::Textfield;
use
strict;
use
warnings;
__PACKAGE__->mk_accessors(
qw(width)
);
sub
init {
my
(
$self
,
$args
) =
@_
;
$self
->width( 40 );
return
;
}
sub
render_field {
my
(
$self
,
$args
) =
@_
;
$args
->{class} .= (
$args
->{class} ?
q( )
:
q()
).(
$self
->class ||
q(ifield)
);
$args
->{size } =
$self
->width;
return
$self
->hacc->textfield(
$args
);
}
1;
# Local Variables:
# mode: perl
# tab-width: 3
# End: