Topic: Checkbox with no label or ID
When this is rendered, it doesn't show the checkboxes. I can change the td's to
<table> <thead> <tr> <th>Name</th> <th>Approved?</th> </tr> </thead> <tbody> <tr> <td>Joe Blow</td> <td><input type="checkbox" /></td> </tr> <tr> <td>John Doe</td> <td><input type="checkbox" /></td> </tr> </tbody> </table>
Now the checkboxes show up, but the empty label tags still take up space and push the checkboxes over so they are no longer properly aligned in the column. I tried adding "style='display:none;" to the labels, but for some reason hiding the labels makes the checkboxes disappear as well. Also, the checkboxes are not clickable, almost as if they were readonly. Clicking them does not check them. I can solve this by changing the code to
<td> <input type="checkbox" /> <label></label> </td>
Now the checkboxes function correctly. However, as stated in my original post, the checkboxes are atuo-generated and I can't add id's to them. Usually checkboxes should function correctly without requiring an id attribute, but how do I get this working in MDB?
<td> <input type="checkbox" id="checkbox1" /> <label for="checkbox1"></label> </td>
We're having the same issue as previous posts, we're using a CMS with edition popins.
As you implemented your code to hide each and every checkbox by default, our edition checkboxes do not show (unless we modify the CMS core just because of using MDB ?!)
Why not processing checkboxes with specific classes only ?
Any updates on this ? It doesn't look like a detail to me.
(By the way, I don't think that your answer asking to create additional JS to iterate through existing DOM is a really "serious" workaround...)
This topic is closed.