User tests: Successful: Unsuccessful:
This should fix the issue with checkbox form field element not storing the unchecked value into the database by adding an empty hidden element before the actual checkbox.
W3C standard is that checkboxes don't submit anything when empty, but W3C standard also makes it possible to override earlier form elements by adding a new element with the same name after the earlier element. But yeah, I'd also like to see a PR for that.
Thanks for your contribution - At this time we are only using github as the place to submit code fixes, the actual reporting of issues and testing fixes is still taking place on Joomlacode.
As it has been some time since you opened this issue can you please confirm that it is still valid with the current Master or Joomla 3.2 beta. If it is no longer valid then please can you close this issue. Otherwise please can you:
1) Open an item on the Joomlacode tracker in the appropriate area.
CMS Bug Reports: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8103
CMS Feature Requests: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8549
2) After submitting the item to the Joomlacode tracker, add a link to the Joomlacode tracker item here and make sure that you add a link to this GitHub issue or pull request on the joomlacode tracker item.
While I basically agree with you on the issue, I fear that we can't implement it like this, since it would be backwards incompatible. There might be people out there, that do something like $post = JRequest::get('post'); isset($post['checkboxvalue']) and in that case, their code would break.
Closing as the tracker item got closed.
I tend to agree that it's not really a bug. It's the behavior of HTML checkboxes and code should imho take care of that when saving the form.
As said, this solution would also not be backward compatible because suddenly things get saved which weren't saved before.
This is the W3C standard. the way to fix is to add an attribute to enable non standard behavior. I'd like to see a pr for that since it's frustrating.