{"action":"closed","issue":{"url":"https://api.github.com/repos/silviomoreto/bootstrap-select/issues/942","labels_url":"https://api.github.com/repos/silviomoreto/bootstrap-select/issues/942/labels{/name}","comments_url":"https://api.github.com/repos/silviomoreto/bootstrap-select/issues/942/comments","events_url":"https://api.github.com/repos/silviomoreto/bootstrap-select/issues/942/events","html_url":"https://github.com/silviomoreto/bootstrap-select/issues/942","id":58765000,"number":942,"title":"Wrong items selected for existing selections","user":{"login":"waldermort","id":5390388,"avatar_url":"https://avatars.githubusercontent.com/u/5390388?v=3","gravatar_id":"","url":"https://api.github.com/users/waldermort","html_url":"https://github.com/waldermort","followers_url":"https://api.github.com/users/waldermort/followers","following_url":"https://api.github.com/users/waldermort/following{/other_user}","gists_url":"https://api.github.com/users/waldermort/gists{/gist_id}","starred_url":"https://api.github.com/users/waldermort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldermort/subscriptions","organizations_url":"https://api.github.com/users/waldermort/orgs","repos_url":"https://api.github.com/users/waldermort/repos","events_url":"https://api.github.com/users/waldermort/events{/privacy}","received_events_url":"https://api.github.com/users/waldermort/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-24T16:39:39Z","updated_at":"2015-02-25T18:17:28Z","closed_at":"2015-02-25T18:17:28Z","body":"I have two forms on the page, both contain an almost identical select control. The options are the same, but the selected attribute is added on the server.\r\n\r\n```html\r\n<select multiple=\"multiple\" class=\"selectpicker form-control\" name=\"data[5][roles][]\" style=\"display: none;\">\r\n  <option value=\"2\">ROLE_USER</option>\r\n  <option selected=\"selected\" value=\"3\">ROLE_SUPER_ADMIN</option>\r\n</select>\r\n\r\n<select multiple=\"multiple\" class=\"selectpicker form-control\" name=\"data[6][roles][]\" style=\"display: none;\">\r\n  <option selected=\"selected\" value=\"2\">ROLE_USER</option>\r\n  <option value=\"3\">ROLE_SUPER_ADMIN</option>\r\n</select>\r\n```\r\n\r\nWhen the page is rendered in the browser, both controls have the ROLE_SUPER_ADMIN option selected. As you can imagine, submitting the form and persisting to the database is going to leave me with a bunch of super admins I don't want :/"}}