Skip to content

Commit

Permalink
Merge pull request #1 from dbcooper/master
Browse files Browse the repository at this point in the history
Wrap a label around <radio> elements
  • Loading branch information
perlpilot committed Dec 16, 2011
2 parents 18b1e68 + c924246 commit 2a331ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/HTML/FormHelpers.pm
Expand Up @@ -99,7 +99,7 @@ sub radio {
while ($i < @$values) {
my ($val,$disp) = @{$values}[$i, $i+1];
my $checked = $on eq $val ? 'checked="checked"' : "";
push @ret, qq(<input type="radio" name="$fname" value="$val" $checked $attributes />$disp);
push @ret, qq(<label><input type="radio" name="$fname" value="$val" $checked $attributes />$disp</label>);
} continue { $i+=2 }
return ref $sep eq 'ARRAY' ? @ret : join $sep,@ret;
}
Expand Down

0 comments on commit 2a331ab

Please sign in to comment.