X-Git-Url: http://git.shiar.net/gitweb.cgi/perl/html-form-simple.git/blobdiff_plain/07e0ed545852a3c579b3475786c02d84a48eb3f2..ac5c326058425050aa8f7ba5036f2f3bc0695350:/lib/HTML/Form/Simple.pm?ds=sidebyside diff --git a/lib/HTML/Form/Simple.pm b/lib/HTML/Form/Simple.pm index b4e42aa..6e84888 100644 --- a/lib/HTML/Form/Simple.pm +++ b/lib/HTML/Form/Simple.pm @@ -22,7 +22,7 @@ sub tag { # strip empty if it shouldn't be defined $attr->{$_} and $attr->{$_} eq '' and delete $attr->{$_} - for qw(id type); + for qw(id type class style); my $return = '<' . $tag; @@ -129,7 +129,12 @@ HTML::Form::Simple my $input = HTML::Form::Simple->new; say $input->start; #
printf "\n", @$_ for ( - [ 'Your Name' => $input->text(username => 'Mr. Default') ], + [ 'Your Name' => $input->text( + user => 'Mr. Default' + ) ], + [ Message => $input->text( + msg => 'Textarea default', {rows => 4, style => 'background:red'} + ) ], [ Colour => $input->select( favcolour => [qw(Blue Green Red)], 'Green' ) ],