{"action":"closed","issue":{"url":"https://api.github.com/repos/mothership-ec/cog/issues/236","labels_url":"https://api.github.com/repos/mothership-ec/cog/issues/236/labels{/name}","comments_url":"https://api.github.com/repos/mothership-ec/cog/issues/236/comments","events_url":"https://api.github.com/repos/mothership-ec/cog/issues/236/events","html_url":"https://github.com/mothership-ec/cog/issues/236","id":20794783,"number":236,"title":"Form: Adding an attribute to the parent form adds it to fields as well","user":{"login":"thomasjthomasj","id":4520924,"avatar_url":"https://avatars.githubusercontent.com/u/4520924?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasjthomasj","html_url":"https://github.com/thomasjthomasj","followers_url":"https://api.github.com/users/thomasjthomasj/followers","following_url":"https://api.github.com/users/thomasjthomasj/following{/other_user}","gists_url":"https://api.github.com/users/thomasjthomasj/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasjthomasj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasjthomasj/subscriptions","organizations_url":"https://api.github.com/users/thomasjthomasj/orgs","repos_url":"https://api.github.com/users/thomasjthomasj/repos","events_url":"https://api.github.com/users/thomasjthomasj/events{/privacy}","received_events_url":"https://api.github.com/users/thomasjthomasj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2013-10-10T09:06:20Z","updated_at":"2015-10-06T10:37:26Z","closed_at":"2015-10-06T10:37:26Z","body":"When adding attributes via the addOptions() method, i.e. \r\n\r\n\t\t$this->addOptions(array(\r\n\t\t\t'attr'  => array(\r\n\t\t\t\t'class' => 'repair-assessment',\r\n\t\t\t\t'data'  => 'hello'\r\n\t\t\t),\r\n\t\t));\r\n\r\nthey get set to the individual form elements. I'm not sure if they go down more than one level, though, because they do not get set to the the options in choice fields (i.e. the individual checkboxes in a checkbox field)"}}