Skip to content

Commit

Permalink
a few more tag helper examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 25, 2016
1 parent 127b20d commit fe02d51
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Mojolicious/Plugin/TagHelpers.pm
Expand Up @@ -253,12 +253,14 @@ L<Mojolicious::Plugin::TagHelpers> implements the following helpers.
=head2 check_box
%= check_box 'employed'
%= check_box employed => 1
%= check_box employed => 1, checked => undef, id => 'foo'
Generate C<input> tag of type C<checkbox>. Previous input values will
automatically get picked up and shown as default.
<input name="employed" type="checkbox">
<input name="employed" type="checkbox" value="1">
<input checked id="foo" name="employed" type="checkbox" value="1">
Expand Down Expand Up @@ -514,12 +516,14 @@ Generate C<input> tag of type C<password>.
=head2 radio_button
%= radio_button 'test'
%= radio_button country => 'germany'
%= radio_button country => 'germany', checked => undef, id => 'foo'
Generate C<input> tag of type C<radio>. Previous input values will
automatically get picked up and shown as default.
<input name="test" type="radio">
<input name="country" type="radio" value="germany">
<input checked id="foo" name="country" type="radio" value="germany">
Expand Down

0 comments on commit fe02d51

Please sign in to comment.