Opened 9 years ago

Closed 9 years ago

#4480 closed (duplicate)

booleanfield newforms marked as editable=false must be set to true by the end user

Reported by: rogerdpack Owned by: nobody
Component: Forms Version: master
Severity: Keywords: newforms, booleanfield
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

May not be a problem, as you can specify editable=false, but

class ResponseToEvaluationUserWhoCreatedComment(forms.Form):

mark_as_cleared = forms.BooleanField()

seems to (for me), with newforms, require the user to check the checkbox. We could rename it "must be checked" :)

Change History (5)

comment:1 Changed 9 years ago by Chris Beaven

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: invalid
Status: newclosed

Yes, this is the way it works by design. Use BooleanField(required=False) if you don't want to have to have it checked.

comment:2 Changed 9 years ago by Beat Bolli

Resolution: invalid
Status: closedreopened

I just fell into the same trap, and I wondered what's the use of a boolean field that must be set? Would you accept a patch that changes the default to required=false for BooleanField and NullBooleanField?

comment:3 Changed 9 years ago by Philippe Raoult

this is related to #5104.

comment:4 Changed 9 years ago by Ville Säävuori

Component: Uncategorizeddjango.newforms
Keywords: newforms booleanfield added

comment:5 Changed 9 years ago by Philippe Raoult

Resolution: duplicate
Status: reopenedclosed
Note: See TracTickets for help on using tickets.
Back to Top