Code

Opened 7 years ago

Closed 7 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" :)

Attachments (0)

Change History (5)

comment:1 Changed 7 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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 7 years ago by bbolli

  • Resolution invalid deleted
  • Status changed from closed to reopened

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 7 years ago by PhiR

this is related to #5104.

comment:4 Changed 7 years ago by Uninen

  • Component changed from Uncategorized to django.newforms
  • Keywords newforms, booleanfield added

comment:5 Changed 7 years ago by PhiR

  • Resolution set to duplicate
  • Status changed from reopened to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.