X-Git-Url: http://git.shiar.net/perl/html-form-simple.git/blobdiff_plain/6eae428dce74b830c31c1ac528a64670957805c8..b54221df138e749a5c2fda079ea4d6241a278a7d:/lib/HTML/Form/Simple.pm
diff --git a/lib/HTML/Form/Simple.pm b/lib/HTML/Form/Simple.pm
index fa7d7ae..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