[BUGFIX] EXT:form - fix clicks on checkbox labels in IE/Edge
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Resources / Private / Frontend / Partials / MultiCheckbox.html
index 7f209e4..cce2ead 100644 (file)
@@ -2,12 +2,13 @@
 <formvh:renderRenderable renderable="{element}">
        <f:render partial="Field/Field" arguments="{element: element}" contentAs="elementContent">
                <div id="{element.uniqueIdentifier}" class="inputs-list">
-                       <f:for each="{element.properties.options}" as="label" key="value">
+                       <f:for each="{element.properties.options}" as="label" key="value" iteration="idIterator">
                                <div class="form-check">
-                                       <label class="form-check-label">
+                                       <label class="form-check-label" for="{element.uniqueIdentifier}-{idIterator.index}">
                                                <f:form.checkbox
                                                        property="{element.identifier}"
                                                        multiple="1"
+                                                       id="{element.uniqueIdentifier}-{idIterator.index}"
                                                        class="{element.properties.elementClassAttribute}"
                                                        value="{value}"
                                                        errorClass="{element.properties.elementErrorClassAttribute}"