populated OPTION field can't be made empty
Bug #591401 reported by
Xavier Brochard
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Woda |
Fix Committed
|
Medium
|
Unassigned |
Bug Description
Imported from the mailing list. Original reporter is Richard Wohlschlegel
A previously populated OPTION field, using checkboxes or multiple select options (typePar CHECKBOX or MULTIPLE), can't be made empty.
When you try to change the setting of this field from any setting to none of the options selected the last stored value will persist, i.e. you can have all checkboxes selected and deselect all then all checkboxes remain selected.
Woda and Perl all versions.
Related branches
lp:~xavier/woda/4.620
- Woda: Pending requested
- Diff: 0 lines
Changed in woda: | |
status: | Confirmed → Fix Committed |
Changed in woda: | |
milestone: | none → merge-with-pro |
To post a comment you must log in.
Trying to get this bug solved, I'm more and more thinking that it is due to normal handling of html forms. www.w3. org/TR/ html401/ interact/ forms.html# h-17.13
See http://
"A successful control is "valid" for submission. Every successful control has its control name paired with its current value as part of the submitted form data set.
...
When no options are selected, the control is not successful and neither the name nor any values are submitted to the server when the form is submitted."
In other words, when no options are selected in a multiple select form or no checkboxes is checked, the browser send nothing.
If one want to verify, simply point your form to http:// www.htmlcodetut orial.com/ cgi-bin/ mycgi.pl
One can also install the well known cgi-lib.pl and use it to print the form's datas submitted: nothing is submitted for unchecked checkboxes or empty select field.