forms.py: Checkbox doesn't work without a value attribute set
Bug #585428 reported by
Bud P. Bruegger
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
web.py |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Tried with web.py 3.3 and 3.4:
Using a Checkbox without the optional 'value' parameter comes out always False, no matter whether the box is checked or not.
An example is the example at http://
myform = form.Form(
...
form.
...
Changed to
form.
it works.
To post a comment you must log in.
The following change seems to be the fix:
form.py line 298: (Checkbox.render)
substitute:
attrs['value'] = self.value
by:
attrs['value'] = self.value or self.name