diff --git a/crispy_bootstrap5/templates/bootstrap5/field.html b/crispy_bootstrap5/templates/bootstrap5/field.html index 142df08..538b8d5 100644 --- a/crispy_bootstrap5/templates/bootstrap5/field.html +++ b/crispy_bootstrap5/templates/bootstrap5/field.html @@ -3,7 +3,7 @@ {% if field.is_hidden %} {{ field }} {% else %} - {% if field|is_checkbox %} + {% if field|is_checkbox and tag != "td" %}
{% if label_class %}
@@ -60,7 +60,7 @@ {% endif %} {% endif %} - {% if field|is_checkbox %} + {% if field|is_checkbox and tag != "td" %} {% if label_class %}
{% endif %} diff --git a/tests/results/test_tabular_formset_layout.html b/tests/results/test_tabular_formset_layout.html index 510e90a..db7c234 100644 --- a/tests/results/test_tabular_formset_layout.html +++ b/tests/results/test_tabular_formset_layout.html @@ -23,11 +23,9 @@ -
-
Insert your email @@ -47,10 +45,8 @@ class="timeinput form-control" id="id_form-__prefix__-datetime_field_1"> -
-
Insert your email @@ -67,10 +63,8 @@ name="form-0-datetime_field_1" class="timeinput form-control" id="id_form-0-datetime_field_1"> -
-
Insert your email @@ -87,10 +81,8 @@ name="form-1-datetime_field_1" class="timeinput form-control" id="id_form-1-datetime_field_1"> -
-
Insert your email diff --git a/tests/results/test_tabular_formset_layout_failing.html b/tests/results/test_tabular_formset_layout_failing.html index ec9a10d..9ce5001 100644 --- a/tests/results/test_tabular_formset_layout_failing.html +++ b/tests/results/test_tabular_formset_layout_failing.html @@ -23,11 +23,9 @@ -
- -
+
-
- -
+