{"action":"closed","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/22914","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/22914/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/22914/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/22914/events","html_url":"https://github.com/joomla/joomla-cms/issues/22914","id":376766063,"node_id":"MDU6SXNzdWUzNzY3NjYwNjM=","number":22914,"title":"Checkbox field values","user":{"login":"brianteeman","id":1296369,"node_id":"MDQ6VXNlcjEyOTYzNjk=","avatar_url":"https://avatars3.githubusercontent.com/u/1296369?v=4","gravatar_id":"","url":"https://api.github.com/users/brianteeman","html_url":"https://github.com/brianteeman","followers_url":"https://api.github.com/users/brianteeman/followers","following_url":"https://api.github.com/users/brianteeman/following{/other_user}","gists_url":"https://api.github.com/users/brianteeman/gists{/gist_id}","starred_url":"https://api.github.com/users/brianteeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianteeman/subscriptions","organizations_url":"https://api.github.com/users/brianteeman/orgs","repos_url":"https://api.github.com/users/brianteeman/repos","events_url":"https://api.github.com/users/brianteeman/events{/privacy}","received_events_url":"https://api.github.com/users/brianteeman/received_events","type":"User","site_admin":false},"labels":[{"id":138443932,"node_id":"MDU6TGFiZWwxMzg0NDM5MzI=","url":"https://api.github.com/repos/joomla/joomla-cms/labels/No%20Code%20Attached%20Yet","name":"No Code Attached Yet","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-11-02T11:06:24Z","updated_at":"2018-11-02T17:56:46Z","closed_at":"2018-11-02T17:56:46Z","author_association":"CONTRIBUTOR","body":"### Steps to reproduce the issue\r\nadd 2 \"checkbox\" fields to any joomla form as below\r\n\r\n\t\t\r\n\t\t<field \r\n\t\t\tname=\"checkboxnovalue\" \r\n\t\t\ttype=\"checkbox\" \r\n\t\t\tlabel=\"chekbox1\" \r\n\t\t/>\r\n\t\t<field \r\n\t\t\tname=\"checkboxcustomvalue\"\r\n\t\t\t type=\"checkbox\" \r\n\t\t\t label=\"checkbox2\" \r\n\t\t\t value=\"CUSTOM\"\r\n\t\t/>\r\n\r\n\r\n### Expected result\r\n1. When saving a form with neither box checked the value in the db will be blank\r\n2. When saving a form with  both checked the values in the db will be \"1\" and \"CUSTOM\"\r\n\r\n\r\n### Actual result\r\n1. values stored as 0\r\n2. values stored as \"On\" and \"CUSTOM\"\r\n\r\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#value\r\n> The value attribute is one which all inputs share; however, it serves a special purpose for inputs of type checkbox: when a form is submitted, only checkboxes which are currently checked are submitted to the server, and the reported value is the value of the value attribute. If the value is not otherwise specified, it is the string \"on\" by default.\r\n"}}
{"actor":{"display_login":"brianteeman"}}