Skip to content

Commit

Permalink
Fix label ids in checkbox element on clone
Browse files Browse the repository at this point in the history
  • Loading branch information
cheesegrits committed Jul 23, 2018
1 parent 44c29f0 commit 14a1f35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/fabrik_element/checkbox/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ define(['jquery', 'fab/elementlist'], function (jQuery, FbElementList) {
this.watchAddToggle();
this.watchAdd();
}
this._getSubElements().each(function (sub, i) {
sub.id = this.options.element + '__' + i + '_input_' + i;
var label = sub.getParent('label');
if (label) {
label.htmlFor = sub.id;
}
}.bind(this));
this.parent(c);
}

Expand Down

0 comments on commit 14a1f35

Please sign in to comment.