Luke Luke - 3 months ago 36
HTML Question

How to use a checkbox in Materialize table

I'm using Materialize and I'm trying to make a table that contains checkboxes. However, there seems to be a problem. A checkbox contained within a table doesn't seem to work. I'm not sure if this a bug or if I'm not doing something correct:

<form action="#">
<td>My Label</td>
<td><input type="checkbox" class="filled-in" /><label></label></td>

How do I make a checkbox contained within a table using Materialize?


You did not have an id for the checkbox and matching for attribute for the label:

<input type="checkbox" id="myCheckbox" class="filled-in" />
<label for="myCheckbox"></label>