description layout
[perl/html-form-simple.git] / lib / HTML / Form / Simple.pm
index fa7d7ae9a94af232e429bd85ab6576e84d52ae73..58e8753498f13ddcbdac4169f32594c21c58081a 100644 (file)
@@ -248,6 +248,47 @@ HTML::Form::Simple - Generate HTML form elements
        );
        say $input->stop; # </form>
 
+=head1 DESCRIPTION
+
+=over
+
+=item C<hidden>
+
+       $input->hidden(name => 'value');
+
+=item C<text>
+
+       $input->text(name => 'default');
+
+=item C<select>
+
+       $input->select(name => ['option'], 'default');
+
+=item C<radio>
+
+       $input->radio(name => ['option'], ['option label'], 'default');
+
+eq
+
+       $input->radio(
+               'name',
+               [ {label => 'option label', value => 'option'} ],
+               {value => 'default'}
+       );
+
+=item C<check>
+
+       $input->check(name => ['label', 'second option'], [0, 1]);
+
+eq
+
+       $input->check(name => [
+               {label => 'label',         value => 1, checked => 0},
+               {label => 'second option', value => 2, checked => 1},
+       ]);
+
+=back
+
 =head1 TODO
 
 =over