{"action":"created","issue":{"url":"https://api.github.com/repos/miguelalarcos/afwrap-xautocomplete/issues/4","labels_url":"https://api.github.com/repos/miguelalarcos/afwrap-xautocomplete/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/miguelalarcos/afwrap-xautocomplete/issues/4/comments","events_url":"https://api.github.com/repos/miguelalarcos/afwrap-xautocomplete/issues/4/events","html_url":"https://github.com/miguelalarcos/afwrap-xautocomplete/issues/4","id":65827206,"number":4,"title":"autocomplete with multiple values in the input box","user":{"login":"kaushik1979","id":5226156,"avatar_url":"https://avatars.githubusercontent.com/u/5226156?v=3","gravatar_id":"","url":"https://api.github.com/users/kaushik1979","html_url":"https://github.com/kaushik1979","followers_url":"https://api.github.com/users/kaushik1979/followers","following_url":"https://api.github.com/users/kaushik1979/following{/other_user}","gists_url":"https://api.github.com/users/kaushik1979/gists{/gist_id}","starred_url":"https://api.github.com/users/kaushik1979/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaushik1979/subscriptions","organizations_url":"https://api.github.com/users/kaushik1979/orgs","repos_url":"https://api.github.com/users/kaushik1979/repos","events_url":"https://api.github.com/users/kaushik1979/events{/privacy}","received_events_url":"https://api.github.com/users/kaushik1979/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-02T03:21:39Z","updated_at":"2015-04-02T22:57:44Z","closed_at":"2015-04-02T21:19:57Z","body":"Hi Miguel,\r\n\r\nCan you help me understand how your plugin works for selecting multiple values in the input box?\r\n\r\nI want to search using autocomplete for email-ids from mongo-db collection, and keep on appending to the existing value in the input box. Here is my code - \r\n\r\nTemplate -\r\n```\r\n<template name=\"quick_qoll\">\r\n  {{#autoForm schema=quickQollSchema id=\"quickQollForm\" type=\"method\" meteormethod=\"sendEmail\"}}\r\n  <fieldset>\r\n    {{> afQuickField type=\"xautocomplete\" formid=\"quickQollForm\" name=\"name\"\r\n        renderKey=\"name\" fieldref=\"email\" call=\"fetch_my_emails\" \r\n        renderfunction=\"renderQollToEmails\" \r\n        callbackfunction=\"renderQollToEmailsCb\"}}\r\n    {{> afQuickField name=\"title\"}}\r\n    {{> afQuickField name=\"text\"}}\r\n    {{> afArrayField name=\"options\"}}\r\n    <div>\r\n      <button type=\"submit\" class=\"btn btn-primary\">Submit</button>\r\n      <button type=\"reset\" class=\"btn btn-default\">Reset</button>\r\n    </div>\r\n  </fieldset>\r\n  {{/autoForm}}\r\n</template>\r\n\r\n\r\n<template name=\"quick_qoll_send_to\">\r\n    <td class=\"qoll-auto-complete\">{{this.name}} <b>{{this.email}}</b></td>\r\n</template>\r\n```\r\n\r\nTemplate Helpers - \r\n```\r\nTemplate.quick_qoll.helpers({\r\n  quickQollSchema: function() {\r\n    return Schemas.quick_qoll;\r\n  }\r\n});\r\n\r\nrenderQollToEmails = function(x) {\r\n    // qlog.info('called render qoll to emails method', filename);\r\n    // console.log(x);\r\n    return Blaze.toHTMLWithData(Template.quick_qoll_send_to, x);\r\n    // return x.email + x.name;\r\n};\r\n\r\nrenderQollToEmailsCb = function(x) {\r\n    // qlog.info('Called the render-to-qoll-emails callback', filename);\r\n    // console.log(x);\r\n};\r\n```\r\n\r\nSchemas.quick_qoll -\r\n```\r\nSchemas.quick_qoll = new SimpleSchema({\r\n  name: {\r\n    type: [String],\r\n    label: \"Send To\",\r\n    regEx: SimpleSchema.RegEx.Email,\r\n    max: 500\r\n  },\r\n  title: {\r\n    type: String,\r\n    label: \"Title\",\r\n    max: 50\r\n  },\r\n  text: {\r\n    type: String,\r\n    label: \"Qoll\",\r\n    min: 60,\r\n    max: 200\r\n  },\r\n  options: {\r\n    type: Array,\r\n    label: \"Qoll Options\",\r\n    optional: false\r\n  },\r\n  'options.$': {\r\n    type: String\r\n  }\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/miguelalarcos/afwrap-xautocomplete/issues/comments/89069219","html_url":"https://github.com/miguelalarcos/afwrap-xautocomplete/issues/4#issuecomment-89069219","issue_url":"https://api.github.com/repos/miguelalarcos/afwrap-xautocomplete/issues/4","id":89069219,"user":{"login":"miguelalarcos","id":4395754,"avatar_url":"https://avatars.githubusercontent.com/u/4395754?v=3","gravatar_id":"","url":"https://api.github.com/users/miguelalarcos","html_url":"https://github.com/miguelalarcos","followers_url":"https://api.github.com/users/miguelalarcos/followers","following_url":"https://api.github.com/users/miguelalarcos/following{/other_user}","gists_url":"https://api.github.com/users/miguelalarcos/gists{/gist_id}","starred_url":"https://api.github.com/users/miguelalarcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguelalarcos/subscriptions","organizations_url":"https://api.github.com/users/miguelalarcos/orgs","repos_url":"https://api.github.com/users/miguelalarcos/repos","events_url":"https://api.github.com/users/miguelalarcos/events{/privacy}","received_events_url":"https://api.github.com/users/miguelalarcos/received_events","type":"User","site_admin":false},"created_at":"2015-04-02T22:57:44Z","updated_at":"2015-04-02T22:57:44Z","body":"Thanks for your words."}}