So I am creating a website using Django templates, forms etc. One thing I've noticed though is that the checkboxes I create via BooleanFields are too small. Any idea how to make the thing bigger?
You can try doing this using css, but the thing is very difficult: http://www.456bereastreet.com/lab/form_controls/checkboxes/
When you create a class in css you can add it to your input using widgets, something like:
field = forms.BooleanField(widget=forms.CheckboxInput(attrs={'class':'your_class'}))
I found below is easier and works for me:
class Meta:
...
widgets = {
'my_checkbox': forms.CheckboxInput(attrs={'style':'width:20px;height:20px;'}),
}
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