diff --git a/crispy_bootstrap5/templates/bootstrap5/field.html b/crispy_bootstrap5/templates/bootstrap5/field.html index 8312e9b..2afe2bb 100644 --- a/crispy_bootstrap5/templates/bootstrap5/field.html +++ b/crispy_bootstrap5/templates/bootstrap5/field.html @@ -10,10 +10,14 @@ {% endif %} {% endif %} <{% if tag %}{{ tag }}{% else %}div{% endif %} id="div_{{ field.auto_id }}" class="mb-3{% if field|is_checkbox and form_show_labels %} form-check{% else %}{% if 'form-horizontal' in form_class %} row{% endif %}{% endif %}{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}"> + + {% if field.label and not field|is_checkbox and form_show_labels %} - + {% if field.use_fieldset %}legend{% else %}label{% endif %}> {% endif %} {% if field|is_checkboxselectmultiple or field|is_radioselect %} @@ -58,6 +62,7 @@ {% if field_class %}{% endif %} {% endif %} {% endif %} + {% if field.use_fieldset and field.label and form_show_labels %}{% endif %} {% if tag %}{{ tag }}{% else %}div{% endif %}> {% if field|is_checkbox and tag != "td" %} {% if label_class %} diff --git a/crispy_bootstrap5/templates/bootstrap5/layout/checkboxselectmultiple_inline.html b/crispy_bootstrap5/templates/bootstrap5/layout/checkboxselectmultiple_inline.html index a494991..af9ca89 100644 --- a/crispy_bootstrap5/templates/bootstrap5/layout/checkboxselectmultiple_inline.html +++ b/crispy_bootstrap5/templates/bootstrap5/layout/checkboxselectmultiple_inline.html @@ -4,11 +4,13 @@