{"action":"created","issue":{"url":"https://api.github.com/repos/mistic100/jQuery-QueryBuilder/issues/76","labels_url":"https://api.github.com/repos/mistic100/jQuery-QueryBuilder/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/mistic100/jQuery-QueryBuilder/issues/76/comments","events_url":"https://api.github.com/repos/mistic100/jQuery-QueryBuilder/issues/76/events","html_url":"https://github.com/mistic100/jQuery-QueryBuilder/issues/76","id":54305633,"number":76,"title":"Configuring Selectize from php","user":{"login":"nWidart","id":882397,"avatar_url":"https://avatars.githubusercontent.com/u/882397?v=3","gravatar_id":"","url":"https://api.github.com/users/nWidart","html_url":"https://github.com/nWidart","followers_url":"https://api.github.com/users/nWidart/followers","following_url":"https://api.github.com/users/nWidart/following{/other_user}","gists_url":"https://api.github.com/users/nWidart/gists{/gist_id}","starred_url":"https://api.github.com/users/nWidart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nWidart/subscriptions","organizations_url":"https://api.github.com/users/nWidart/orgs","repos_url":"https://api.github.com/users/nWidart/repos","events_url":"https://api.github.com/users/nWidart/events{/privacy}","received_events_url":"https://api.github.com/users/nWidart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-01-14T10:22:06Z","updated_at":"2015-01-15T07:00:12Z","closed_at":null,"body":"Hi,\r\n\r\nFirst of all, thank for building this great tool! :smiley: \r\n\r\nI'm trying to use `selectize` plugin to make all my dropdowns as selectize instances. One important detail is that I make the filters array from a php script, which I return to the view using `json_encode` and place inside the `filters` key.\r\n\r\nSomething like the following:\r\n\r\n``` javascript\r\n$('#builder').queryBuilder({\r\n    sortable: true,\r\n\r\n    icons: {\r\n        add_group: 'fa fa-plus',\r\n        add_rule: 'fa fa-plus',\r\n        remove_group: 'fa fa-times',\r\n        remove_rule: 'fa fa-times',\r\n        sort: 'fa fa-sort'\r\n    },\r\n\r\n    filters: <?php echo $filters; ?>\r\n});\r\n\r\n```\r\n\r\nOnly I'm wondering how to use selectize with this kind of structure. Since I can't make that closure you have in the [example](http://mistic100.github.io/jQuery-QueryBuilder/demo-widgets.html) `onInitialize`, where you loop over every item to add it to selectize.\r\nI do have the data in the `values:` key though, like a classic dropdown without plugins.\r\n\r\nThank you!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mistic100/jQuery-QueryBuilder/issues/comments/70047301","html_url":"https://github.com/mistic100/jQuery-QueryBuilder/issues/76#issuecomment-70047301","issue_url":"https://api.github.com/repos/mistic100/jQuery-QueryBuilder/issues/76","id":70047301,"user":{"login":"nWidart","id":882397,"avatar_url":"https://avatars.githubusercontent.com/u/882397?v=3","gravatar_id":"","url":"https://api.github.com/users/nWidart","html_url":"https://github.com/nWidart","followers_url":"https://api.github.com/users/nWidart/followers","following_url":"https://api.github.com/users/nWidart/following{/other_user}","gists_url":"https://api.github.com/users/nWidart/gists{/gist_id}","starred_url":"https://api.github.com/users/nWidart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nWidart/subscriptions","organizations_url":"https://api.github.com/users/nWidart/orgs","repos_url":"https://api.github.com/users/nWidart/repos","events_url":"https://api.github.com/users/nWidart/events{/privacy}","received_events_url":"https://api.github.com/users/nWidart/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T07:00:12Z","updated_at":"2015-01-15T07:00:12Z","body":"Right, thanks. :)\r\n\r\nWhy is it duplicating content though ? Again, in Selectize on its own, no duplication.\r\nIn a clean selectize demo page:\r\n\r\n![screen shot 2015-01-15 at 7 59 06 am](https://cloud.githubusercontent.com/assets/882397/5753642/7fb5f8f4-9c8c-11e4-95d3-d84f17f17388.png)\r\n\r\nIn the query-builder:\r\n\r\n![screen shot 2015-01-15 at 7 59 17 am](https://cloud.githubusercontent.com/assets/882397/5753643/8334ab6a-9c8c-11e4-8e43-0a4625e7fcf7.png)\r\n"}}