{"action":"created","issue":{"url":"https://api.github.com/repos/aldeed/meteor-autoform-select2/issues/28","labels_url":"https://api.github.com/repos/aldeed/meteor-autoform-select2/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/aldeed/meteor-autoform-select2/issues/28/comments","events_url":"https://api.github.com/repos/aldeed/meteor-autoform-select2/issues/28/events","html_url":"https://github.com/aldeed/meteor-autoform-select2/issues/28","id":63099372,"number":28,"title":"Option label being saved instead of value","user":{"login":"bshamblen","id":4249514,"avatar_url":"https://avatars.githubusercontent.com/u/4249514?v=3","gravatar_id":"","url":"https://api.github.com/users/bshamblen","html_url":"https://github.com/bshamblen","followers_url":"https://api.github.com/users/bshamblen/followers","following_url":"https://api.github.com/users/bshamblen/following{/other_user}","gists_url":"https://api.github.com/users/bshamblen/gists{/gist_id}","starred_url":"https://api.github.com/users/bshamblen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bshamblen/subscriptions","organizations_url":"https://api.github.com/users/bshamblen/orgs","repos_url":"https://api.github.com/users/bshamblen/repos","events_url":"https://api.github.com/users/bshamblen/events{/privacy}","received_events_url":"https://api.github.com/users/bshamblen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-19T21:57:37Z","updated_at":"2015-04-13T17:51:24Z","closed_at":null,"body":"I have a fairly basic implementation of a select2 field, where I'm setting the `options` attribute using a helper function, to dynamically generate the list of select options. Until the most recent update this was working as expected, exactly the same as a regular select field but with autocomplete functionality. The `label`s would be displayed to the user and the selected `value` would be saved in the mongoDB record. \r\n\r\nNow, instead of the `value` being saved the `label` is being saved. I've added the references to the the select2 .js and .css files in my page template, per the instructions for the 2.0.0 upgrade, but it's still saving the `label`, not the `value`. Here's an example of how I have it configured now, but reduced to just a static options list (mine is pulling from a collection). \r\n\r\n```html\r\n{{>afQuickField name='fieldName' type='select2' options=selectOptions}}\r\n```\r\n\r\nMy helper function looks something like this:\r\n\r\n```javascript\r\nTemplate.myTemplateName.helpers({\r\n    selectOptions: function() {\r\n        return [\r\n            {\r\n                label: 'Item 1',\r\n                value: '1'\r\n            },\r\n            {\r\n                label: 'Item 2',\r\n                value: '2'\r\n            },\r\n            {\r\n                label: 'Item 3',\r\n                value: '3'\r\n            },\r\n            {\r\n                label: 'Item 4',\r\n                value: '4'\r\n            },\r\n            {\r\n                label: 'Item 5',\r\n                value: '5'\r\n            }\r\n        ];\r\n    }\r\n})\r\n```\r\n\r\nIf I select \"Item 4\" from the list and submit the form the value of `fieldName` is set to \"Item 4\", instead of \"4\", like a standard select field. Again, this worked correctly until the most recent update. Any help would be greatly appreciated. Thanks! "},"comment":{"url":"https://api.github.com/repos/aldeed/meteor-autoform-select2/issues/comments/92444393","html_url":"https://github.com/aldeed/meteor-autoform-select2/issues/28#issuecomment-92444393","issue_url":"https://api.github.com/repos/aldeed/meteor-autoform-select2/issues/28","id":92444393,"user":{"login":"bshamblen","id":4249514,"avatar_url":"https://avatars.githubusercontent.com/u/4249514?v=3","gravatar_id":"","url":"https://api.github.com/users/bshamblen","html_url":"https://github.com/bshamblen","followers_url":"https://api.github.com/users/bshamblen/followers","following_url":"https://api.github.com/users/bshamblen/following{/other_user}","gists_url":"https://api.github.com/users/bshamblen/gists{/gist_id}","starred_url":"https://api.github.com/users/bshamblen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bshamblen/subscriptions","organizations_url":"https://api.github.com/users/bshamblen/orgs","repos_url":"https://api.github.com/users/bshamblen/repos","events_url":"https://api.github.com/users/bshamblen/events{/privacy}","received_events_url":"https://api.github.com/users/bshamblen/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T17:51:24Z","updated_at":"2015-04-13T17:51:24Z","body":"I created a sample project with just one form, one field and it worked as expected. Going back to my other project I performed a `meteor update` thinking that would solve everything, but apparently one of the other form types that we're using `yogiben:autoform-tags` still requires auto form 4.0. So, I'm stuck for the moment, but not as a result of this issue. Thanks for your help. "}}