Is there a way to apply a class in a form to a {{ field.label_tag }}
I'm using twitter bootstrap and want to add a class to the label tag that field.label_tag
Hopefully there is a way to handle this. I'm using django widget tweaks to do this for the other half of the form for entering the information. Just hoping there is something I've missed that will make it this part just as easy.
Have you tried manually creating the label element, like so:
<label class="your-class" for="{{ field.auto_id }}">{{ field.label }}</label>
Reference: Looping over Form Fields
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With