Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make labels 'clickable' for radio and checkbox elements

  • Loading branch information...
commit dd98a428c5e8f1b02ce19465779195b2cf53fe74 1 parent a04f151
@mbbx6spp mbbx6spp authored
View
1  src/elements/forms/element_checkbox.erl
@@ -25,6 +25,7 @@ render_element(Record) ->
% Checkbox...
wf_tags:emit_tag(input, [
{name, Anchor},
+ {id, Anchor},
{type, checkbox},
{class, [checkbox, Record#checkbox.class]},
{style, Record#checkbox.style},
View
4 src/elements/forms/element_radio.erl
@@ -27,7 +27,7 @@ render_element(Record) ->
%% Checkbox...
wf_tags:emit_tag(input, [
{name, Record#radio.name},
- {id, ID},
+ {id, Anchor},
{value, Record#radio.value},
{type, radio},
{class, [radio, Record#radio.class]},
@@ -37,6 +37,6 @@ render_element(Record) ->
%% Label for Radio...
wf_tags:emit_tag(label, Content, [
- {for, ID}
+ {for, Anchor}
])
].

0 comments on commit dd98a42

Please sign in to comment.
Something went wrong with that request. Please try again.