{"action":"created","issue":{"url":"https://api.github.com/repos/jadu/pulsar/issues/27","repository_url":"https://api.github.com/repos/jadu/pulsar","labels_url":"https://api.github.com/repos/jadu/pulsar/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/jadu/pulsar/issues/27/comments","events_url":"https://api.github.com/repos/jadu/pulsar/issues/27/events","html_url":"https://github.com/jadu/pulsar/issues/27","id":131601054,"number":27,"title":"Create new `form.choice()` helper","user":{"login":"Stanton","id":18653,"avatar_url":"https://avatars.githubusercontent.com/u/18653?v=3","gravatar_id":"","url":"https://api.github.com/users/Stanton","html_url":"https://github.com/Stanton","followers_url":"https://api.github.com/users/Stanton/followers","following_url":"https://api.github.com/users/Stanton/following{/other_user}","gists_url":"https://api.github.com/users/Stanton/gists{/gist_id}","starred_url":"https://api.github.com/users/Stanton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stanton/subscriptions","organizations_url":"https://api.github.com/users/Stanton/orgs","repos_url":"https://api.github.com/users/Stanton/repos","events_url":"https://api.github.com/users/Stanton/events{/privacy}","received_events_url":"https://api.github.com/users/Stanton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jadu/pulsar/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/jadu/pulsar/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"Stanton","id":18653,"avatar_url":"https://avatars.githubusercontent.com/u/18653?v=3","gravatar_id":"","url":"https://api.github.com/users/Stanton","html_url":"https://github.com/Stanton","followers_url":"https://api.github.com/users/Stanton/followers","following_url":"https://api.github.com/users/Stanton/following{/other_user}","gists_url":"https://api.github.com/users/Stanton/gists{/gist_id}","starred_url":"https://api.github.com/users/Stanton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stanton/subscriptions","organizations_url":"https://api.github.com/users/Stanton/orgs","repos_url":"https://api.github.com/users/Stanton/repos","events_url":"https://api.github.com/users/Stanton/events{/privacy}","received_events_url":"https://api.github.com/users/Stanton/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-02-05T09:56:31Z","updated_at":"2016-02-05T10:34:16Z","closed_at":null,"body":"Todo:\r\n----\r\n\r\n- [ ] Documentation\r\n- [ ] Unit tests\r\n\r\nInitial documentation:\r\n----\r\n# Choice\r\n\r\nDisplayed as a question with multiple answers, each of which has it's own label and can allow either singular (checkboxes) or multiple (radios) choice.\r\n\r\nBy default, the choice helper will will automatically adhere to Pulsar's form styleguide by switching to a [select2](select2.md) element if more than 5 options are provided.\r\n\r\n## Example usage\r\n\r\n```twig\r\n{{\r\n    form.choice({\r\n        'label': 'Do you like me?',\r\n        'options': [\r\n            {\r\n                'label': 'Yes',\r\n                'value': '1'\r\n            },\r\n            {\r\n                'No': '0',\r\n                'value': 'No'\r\n            },\r\n            {\r\n                'label': 'Maybe',\r\n                'value': '¯\\_(ツ)_/¯'\r\n            }\r\n        ]\r\n    })\r\n}}\r\n```\r\n\r\n## Options\r\n\r\nOption     | Type   | Description\r\n---------- | ------ | -------------------------------------------------------\r\nautoswitch | bool   | Whether the control shoud use a  select2 if more than 5 options are provided. Default `true`\r\nclass      | string | A space separated list of class names\r\nhelp       | string | Additional guidance information to be displayed next to the input\r\nlabel      | string | Text for the main `<label>` companion element\r\noptions    | array  | An array of option hashes that will be passed to the [checkbox](checkbox.md) or  [radio](radio.md) helper, see their documentation for specifics\r\nrequired   | bool   | Visually indicates that the field must be completed, will not be displayed if `type` is radio as they're implicitly required\r\ntype       | string | Which type of control to use `checkbox (default)` or `radio`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jadu/pulsar/issues/comments/180288119","html_url":"https://github.com/jadu/pulsar/issues/27#issuecomment-180288119","issue_url":"https://api.github.com/repos/jadu/pulsar/issues/27","id":180288119,"user":{"login":"Stanton","id":18653,"avatar_url":"https://avatars.githubusercontent.com/u/18653?v=3","gravatar_id":"","url":"https://api.github.com/users/Stanton","html_url":"https://github.com/Stanton","followers_url":"https://api.github.com/users/Stanton/followers","following_url":"https://api.github.com/users/Stanton/following{/other_user}","gists_url":"https://api.github.com/users/Stanton/gists{/gist_id}","starred_url":"https://api.github.com/users/Stanton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stanton/subscriptions","organizations_url":"https://api.github.com/users/Stanton/orgs","repos_url":"https://api.github.com/users/Stanton/repos","events_url":"https://api.github.com/users/Stanton/events{/privacy}","received_events_url":"https://api.github.com/users/Stanton/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T10:34:15Z","updated_at":"2016-02-05T10:34:15Z","body":"Great points, much prefer the `multiple` option, not sure about `extent` as the user config side of that doesn't feel obvious...\r\n"}}