<{{ fieldset|yesno:'fieldset,div' }} class="{{ wrapper_class }} {% if check %}form-check{% endif %}">
    {% if check %}
        {{ field }}
        <label for="{{ field.id_for_label }}" class="form-check-label {{ label_classes }}">{{ field.label }}</label>
    {% else %}
        {% if fieldset %}
            <legend class="form-label fs-6 {{ label_classes }}">{{ field.label }}</legend>
        {% else %}
            <label class="form-label {{ label_classes }}" for="{{ field.id_for_label }}">{{ field.label }}</label>
        {% endif %}
        {% if addon_before or addon_after %}
            <div class="input-group">
                {% if addon_before %}
                    <span class="input-group-text">{{ addon_before }}</span>
                {% endif %}
                {{ field }}
                {% if addon_after %}
                    <span class="input-group-text">{{ addon_after }}</span>
                {% endif %}
            </div>
        {% else %}
            {{ field }}
        {% endif %}
    {% endif %}
    {% if field.help_text %}
        <div class="form-text" id="{{ field.auto_id }}_helptext">{{ field.help_text }}</div>
    {% endif %}
    {% if field.errors %}
        <div id="{{ field.auto_id }}_error">
            {% for error in field.errors %}
                <div class="form-text text-danger">{{ error }}</div>
            {% endfor %}
        </div>
    {% endif %}
</{{ fieldset|yesno:'fieldset,div' }}>
