-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add_class on label #39
Comments
+1 |
Or just Update:
This renders: |
Another solution is to render <div class="form-group row">
<label for="{{ form.make.auto_id }}" class="col-sm-3 col-form-label">{{ form.make.label }}</label>
<div class="col-sm-9">
{% render_field form.make class+='form-control' %}
{% include 'common/partials/field-errors.html' with errors=form.make.errors %}
</div>
</div> |
@resurtm I am using something similar to your solution... can you share what you're including with |
@treyd, oh there is nothing special inside: {% if errors %}
<div class="invalid-feedback">
{% for error in errors %}
{{ error }}
{% endfor %}
</div>
{% endif %} |
It was just merged. |
@camilonova This is all great, any ideas on when the next release will be out? :) Would love to use this in a new project I'm working on. |
I'll see if I can make a release real quick |
It would be nice to have add_class be able to accept field labels.
See https://bitbucket.org/kmike/django-widget-tweaks/issues/6/not-able-to-add-class-on-label
The text was updated successfully, but these errors were encountered: