1

I want to display a grid of checkboxes using html (and django backend). Here is the html I wrote for that. I am using the latest version of Materialize. However the checkboxes I get are unclickable. Am I doing something wrong? I read up that Materialize checkboxes do not working in a <div> tag. My table is indeed in a <div> tag. What is a workaround? If there is no workaround, how to use default html5 checkboxes?

<table class="striped bordered centered">
    <thead>
        <tr>
            <th>Departments</th>
            {% for program in program_list %}
            <th>{{program.name}}</th>
            {% endfor %}
        </tr>
    </thead>
    <tbody>
        {% for department in department_list %}
        <tr>
            <th>{{department.name}}</th>
            {% for program in program_list %}
                <td>
                    <input id="{{forloop.parentloop.counter}}_{{forloop.counter}}" type="radio">
                    <label for="{{forloop.parentloop.counter}}_{{forloop.counter}}"></label>
                </td>
            {% endfor %}
        </tr>
        {% endfor %}
    </tbody>
</table>
Meet Taraviya
  • 869
  • 1
  • 8
  • 27

0 Answers0