Re: Checkbox checking

2012-08-01 Thread Bill Freeman
I'm going to assume that we're talking about a single checkbox (an "I agree to the terms" checkbox). First, remember that unchecked is not the same as "blank", it is "false", so "blank=False" is subject to interpretation. There are two places where you might insist that the box be checked: in the

Re: Checkbox checking

2012-08-01 Thread Carlos Palol
It seems in this particular case you don't need the boolean field in the model. As the behaviour you want has to do only with the form, you just have to add an additional required checkbox in this model form. class MyModelForm(forms.ModelForm): involved = forms.BooleanField(required=True) clas

Checkbox checking

2012-08-01 Thread Jon Underwood
Hi, My checkboxes are giving me grief. I want to make it required for the user to check a checkbox before being allowed to submit a forms. I'm using model forms so the checkbox is defined as a models.BooleanField in my models.py. I have included blank=False, though this should be the default.