zostera / django-bootstrap5

Bootstrap 5 for Django
BSD 3-Clause "New" or "Revised" License
395 stars 87 forks source link

Wrapper collides with input-group functionality #438

Open somas95 opened 1 year ago

somas95 commented 1 year ago

Bootstrap 5 allows for input-groups of several form fields, but django-bootstrap5 wraps each field in a div, which prevents the style classes to be applied correctly:

<div class="input-group">
    {% bootstrap_field form.field_a %}
    {% bootstrap_field form.field_b %}
</div>
jayqi commented 5 months ago

I have this issue as well. It seems like this could be fixed by just making the wrapper optional with a way to disable it.

I tried setting wrapper_class='' but the extra layer of <div> still messes up the styling.