X-Git-Url: http://git.shiar.net/perl/html-form-simple.git/blobdiff_plain/d01447ff464d00e35109d91c1da8578fd48e43d2..b54221df138e749a5c2fda079ea4d6241a278a7d:/lib/HTML/Form/Simple.pm diff --git a/lib/HTML/Form/Simple.pm b/lib/HTML/Form/Simple.pm index 59f0e4c..f96149f 100644 --- a/lib/HTML/Form/Simple.pm +++ b/lib/HTML/Form/Simple.pm @@ -213,6 +213,8 @@ sub check { } } exists $rows->[$_]->{value} or $rows->[$_]->{value} = $_ + 1 for 0 .. $#$rows; + $rows->[0]->{id} = $attr->{id} || $rows->[0]->{name} || $attr->{name} || $name #XXX: // + if ref $label ne 'ARRAY' and defined $rows->[0] and not defined $rows->[0]->{id}; $self->select($name, $rows, {%$attr, type => 'checkbox'}); } @@ -248,6 +250,47 @@ HTML::Form::Simple - Generate HTML form elements ); say $input->stop; # +=head1 DESCRIPTION + +=over + +=item C + + $input->hidden(name => 'value'); + +=item C + + $input->text(name => 'default'); + +=item C