Skip to content

Commit

Permalink
changed order of select_field examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 2, 2014
1 parent b45db60 commit b671ef5
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions lib/Mojolicious/Plugin/TagHelpers.pm
Expand Up @@ -588,10 +588,10 @@ picked up and shown as default.
=head2 select_field
%= select_field country => [qw(de en)]
%= select_field country => [c(EU => [qw(de en)]), c(Asia => [qw(cn jp)])]
%= select_field country => [[Germany => 'de'], 'en'], id => 'eu'
%= select_field country => [c(EU => [[Germany => 'de'], 'en'], id => 'eu')]
%= select_field country => [[Germany => 'de', class => 'eu'], 'en']
%= select_field country => [c(EU => [[Germany => 'de'], 'en'], id => 'eu')]
%= select_field country => [c(EU => [qw(de en)]), c(Asia => [qw(cn jp)])]
Generate select and option elements from array references and optgroup
elements from L<Mojo::Collection> objects. Previous input values will
Expand All @@ -601,29 +601,29 @@ automatically get picked up and shown as default.
<option value="de">de</option>
<option value="en">en</option>
</select>
<select name="country">
<optgroup label="EU">
<option value="de">de</option>
<option value="en">en</option>
</optgroup>
<optgroup label="Asia">
<option value="cn">cn</option>
<option value="jp">jp</option>
</optgroup>
</select>
<select id="eu" name="country">
<option value="de">Germany</option>
<option value="en">en</option>
</select>
<select name="country">
<option class="eu" value="de">Germany</option>
<option value="en">en</option>
</select>
<select name="country">
<optgroup id="eu" label="EU">
<option value="de">Germany</option>
<option value="en">en</option>
</optgroup>
</select>
<select name="country">
<option class="eu" value="de">Germany</option>
<option value="en">en</option>
<optgroup label="EU">
<option value="de">de</option>
<option value="en">en</option>
</optgroup>
<optgroup label="Asia">
<option value="cn">cn</option>
<option value="jp">jp</option>
</optgroup>
</select>
=head2 stylesheet
Expand Down

0 comments on commit b671ef5

Please sign in to comment.