# 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;
my $input = HTML::Form::Simple->new;
say $input->start; # <form>
printf "<label>%s: %s</label>\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'
) ],
);
is(
- $form->input('', '', {disabled => 0, something => undef}),
+ $form->input('', '', {disabled => 0, something => undef, class => undef, style => ''}),
'<input name="" type="text" value="">',
'input with empty attributes'
);