Skip to content

bootstrap_field field form_check_class doesn't overwrite the default checkbox class  #290

@ClintGit

Description

@ClintGit

Tried the following:
<form method="POST" action="{% url 'myauth:account_signup' %}">
{% csrf_token %}
{% for field in signup_form %}
{% if field.name == 'sign-agree-check' %}
{% bootstrap_field field form_check_class='checkmark' show_label=False %}
{% else %}
{% bootstrap_field field show_label=False field_class='m-0 p-0' form_group_class='m-0 p-0' label_class='m-0 p-0' %}
{% endif %}
{% endfor %}
<button type="submit" class="site-btn">Register Now</button>
</form>

This is the HTML that is rendered:
<div class="form-group">
<div class="form-check">
<input type="checkbox" name="sign-agree-check" id="sign-agree-check" class="form-check-input" required="">
<label class="form-check-label" for="sign-agree-check">
I agree to the terms &amp; conditions
</label>
</div>
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions