forms.IntegerField(widget=forms.CheckboxInput(attrs={'value':1}), required=False)
won't work because def value_from_datadict(self, data, files, name): if name not in data: # A missing value means False because HTML form submission does not # send results for unselected checkboxes. return False return super(CheckboxInput, self).value_from_datadict(data, files, name) returns False when the box is unchecked, and False is not one of the EMPTY_FIELDS so you end up with required=True even when you specify required=False Not sure how to fix this for real, I've created a CheckboxInteger that returns None instead of False.... Any better ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---