{"id":15042297,"url":"https://github.com/ommu/yii2-selectize","last_synced_at":"2025-10-04T05:31:26.288Z","repository":{"id":57031364,"uuid":"184004870","full_name":"ommu/yii2-selectize","owner":"ommu","description":"selectize.js wrapper for Yii2 framework.","archived":false,"fork":true,"pushed_at":"2025-08-05T02:01:32.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-07T13:04:41.948Z","etag":null,"topics":["dropdown","form","selectize","selectizejs","tag-input","tags","yii2","yii2-extension"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"yii2mod/yii2-selectize","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ommu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-29T05:23:48.000Z","updated_at":"2025-08-05T02:01:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ommu/yii2-selectize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ommu/yii2-selectize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ommu%2Fyii2-selectize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ommu%2Fyii2-selectize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ommu%2Fyii2-selectize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ommu%2Fyii2-selectize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ommu","download_url":"https://codeload.github.com/ommu/yii2-selectize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ommu%2Fyii2-selectize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278267463,"owners_count":25958869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dropdown","form","selectize","selectizejs","tag-input","tags","yii2","yii2-extension"],"created_at":"2024-09-24T20:47:06.220Z","updated_at":"2025-10-04T05:31:26.271Z","avatar_url":"https://github.com/ommu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/yiisoft\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://avatars0.githubusercontent.com/u/993323\" height=\"100px\"\u003e\n    \u003c/a\u003e\n    \u003ch1 align=\"center\"\u003eYii2 Selectize Widget\u003c/h1\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\nWidget based on selectize.js extension https://selectize.github.io/selectize.js/\n\n[![Latest Stable Version](https://poser.pugx.org/yii2mod/yii2-selectize/v/stable)](https://packagist.org/packages/yii2mod/yii2-selectize) [![Total Downloads](https://poser.pugx.org/yii2mod/yii2-selectize/downloads)](https://packagist.org/packages/yii2mod/yii2-selectize) [![License](https://poser.pugx.org/yii2mod/yii2-selectize/license)](https://packagist.org/packages/yii2mod/yii2-selectize)\n[![Build Status](https://travis-ci.org/yii2mod/yii2-selectize.svg?branch=master)](https://travis-ci.org/yii2mod/yii2-selectize)\n\nInstallation \n------------\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\nphp composer.phar require --prefer-dist ommu/yii2-selectize \"dev-master\"\n```\n\nor add\n\n```json\n\"ommu/yii2-selectize\": \"dev-master\"\n```\n\nto the require section of your composer.json.\n\nUsage\n------------\nOnce the extension is installed, simply add widget to your page as follows:\n\n1) Tagging input:\n```php\necho $form-\u003efield($model, \"attribute\")-\u003ewidget(Selectize::className(), [\n        'pluginOptions' =\u003e [\n            'persist' =\u003e false,\n            'createOnBlur' =\u003e true,\n            'create' =\u003e true\n        ]\n]); \n```\n2) Select input:\n```php\necho $form-\u003efield($model, \"attribute\")-\u003ewidget(Selectize::className(), [\n        'items' =\u003e [\n            'Yes',\n            'No'\n        ],\n        'pluginOptions' =\u003e [\n            'persist' =\u003e false,\n            'createOnBlur' =\u003e true,\n            'create' =\u003e true\n        ]\n]); \n```\n\n3) Tagging input with remote source and default values(If you want render select input, just setup items property):\n\n **Setup view file:**\n \n```php\n// setup the following to get the existing data from database\n$model-\u003eattribute = 'first, last';\n \n// or if the data is an array you can preselect the tags like this\n$model-\u003eattribute = implode(', ', [\"first\", \"last\"]);\n\necho $form-\u003efield($model, \"attribute\")-\u003ewidget(Selectize::className(), [\n         'url' =\u003e '/site/search',\n         'pluginOptions' =\u003e [\n            'valueField' =\u003e 'name',\n            'labelField' =\u003e 'name',\n            'searchField' =\u003e ['name'],\n            'persist' =\u003e false,\n            'createOnBlur' =\u003e true,\n            'create' =\u003e true\n        ]\n]);\n ```\n\n **Your action must return data in the json format, for example:**\n\n```php\n  public function actionSearch($query = null)\n  {\n      Yii::$app-\u003eresponse-\u003eformat = Response::FORMAT_JSON;\n      return [\n          ['name' =\u003e 'Search Item 1'],\n          ['name' =\u003e 'Search Item 2'],\n      ];\n  }\n```\n4) Usage widget with plugins:\n```php\necho Selectize::widget([\n        'name' =\u003e 'tag-selectize',\n        'options' =\u003e [\n             'data-data' =\u003e $values ? Json::encode($values) : null // Set default values\n        ],\n        'pluginOptions' =\u003e [\n             // define list of plugins \n            'plugins' =\u003e ['drag_drop', 'remove_button'],\n            'persist' =\u003e false,\n            'createOnBlur' =\u003e true,\n            'create' =\u003e true\n        ]\n ]);\n```            \nSelect Options \n----------------\nYou can find them on the [options page](https://github.com/brianreavis/selectize.js/blob/master/docs/api.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fommu%2Fyii2-selectize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fommu%2Fyii2-selectize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fommu%2Fyii2-selectize/lists"}