PHPackages                             kartik-v/yii2-sortable-input - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kartik-v/yii2-sortable-input

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

kartik-v/yii2-sortable-input
============================

Sortable input widget based on yii2-sortable extension.

v1.2.1(7y ago)24660.4k↓13.9%92BSD-3-ClausePHP

Since Oct 5Pushed 6y ago2 watchersCompare

[ Source](https://github.com/kartik-v/yii2-sortable-input)[ Packagist](https://packagist.org/packages/kartik-v/yii2-sortable-input)[ Docs](https://github.com/kartik-v/yii2-sortable-input)[ RSS](/packages/kartik-v-yii2-sortable-input/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (2)

 [ ![Krajee Logo](https://camo.githubusercontent.com/4addfbb3869c3fc7d79befea4f06d9cf3655a686fb503df0da1d725859cfdef9/687474703a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f6b72616a65652d6c6f676f2d622e706e67) ](http://demos.krajee.com "Krajee Demos")
 yii2-sortable-input ---

 [ ![Donate](https://camo.githubusercontent.com/4af77d425ca202e55ab3d711b438e238ded194735bc345a019ac060e03e26227/687474703a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f646f6e6174652e706e67) ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DTP3NZQ6G2AYU "Donate via Paypal")
=======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#------------------------yii2-sortable-input--------------------)

[![Stable Version](https://camo.githubusercontent.com/10ab324f5a2f143c20934be27636f14189e8b9b2b2282d1293f158c50b59eae2/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736f727461626c652d696e7075742f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-sortable-input)[![Unstable Version](https://camo.githubusercontent.com/19ba2d9d32c1b9b40a0b075fb1f380941045371e6a2f11c5cd7071ff7cd6bb69/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736f727461626c652d696e7075742f762f756e737461626c65)](https://packagist.org/packages/kartik-v/yii2-sortable-input)[![License](https://camo.githubusercontent.com/4b780b7782a4945c49dc1f0e0bb3d3f0c8b669e0622452f1cb92d91fe0146cca/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736f727461626c652d696e7075742f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-sortable-input)[![Total Downloads](https://camo.githubusercontent.com/0ee678f1c59696530452a019187e548184062fe7b7eb2618376fdfca943d2a9a/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736f727461626c652d696e7075742f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-sortable-input)[![Monthly Downloads](https://camo.githubusercontent.com/1c856fbcfba9ab33f2f3bd98a69d28f3ef597d0cf10fca610a3411de0d0d7f51/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736f727461626c652d696e7075742f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-sortable-input)[![Daily Downloads](https://camo.githubusercontent.com/da059e5527e9ab8e824f9f1e2ba80470bd9506dddb190b1e4fb031c4b52e6e54/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736f727461626c652d696e7075742f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-sortable-input)

An input widget for Yii 2.0 widget based on the [yii2-sortable](http://demos.krajee.com/sortable) extension that allows you to create sortable-input lists and grids and manipulate them using simple drag and drop. It extends the yii2-sortable features by allowing you to store the sort order in a form input (which is hidden by default). The widget stores the order as delimited list item keys. The widget includes additional jQuery enhancements to initialize the list, trap sortable order change, and reset order on form reset.

### Demo

[](#demo)

You can see detailed [documentation](http://demos.krajee.com/sortable-input) on usage of the extension.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

> NOTE: Check the [composer.json](https://github.com/kartik-v/yii2-sortable-input/blob/master/composer.json) for this extension's requirements and dependencies. Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.

Either run

```
$ php composer.phar require kartik-v/yii2-sortable-input "dev-master"

```

or add

```
"kartik-v/yii2-sortable-input": "dev-master"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

### SortableInput

[](#sortableinput)

```
use kartik\sortinput\SortableInput;
echo SortableInput::widget([
    'model' => $model,
    'attribute' => 'sort_list',
    'hideInput' => false,
    'delimiter' => '~',
    'items' => [
        1 => ['content' => 'Item # 1'],
        2 => ['content' => 'Item # 2'],
        3 => ['content' => 'Item # 3'],
        4 => ['content' => 'Item # 4', 'disabled'=>true],
    ]
]);
```

License
-------

[](#license)

**yii2-sortable-input** is released under the BSD-3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity48

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 93.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~712 days

Total

3

Last Release

2820d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3592619?v=4)[Kartik Visweswaran](/maintainers/kartik-v)[@kartik-v](https://github.com/kartik-v)

---

Top Contributors

[![kartik-v](https://avatars.githubusercontent.com/u/3592619?v=4)](https://github.com/kartik-v "kartik-v (27 commits)")[![is7](https://avatars.githubusercontent.com/u/4538271?v=4)](https://github.com/is7 "is7 (2 commits)")

---

Tags

jquerysortableyii2extensionwidgetbootstrapinputrange

### Embed Badge

![Health badge](/badges/kartik-v-yii2-sortable-input/health.svg)

```
[![Health](https://phpackages.com/badges/kartik-v-yii2-sortable-input/health.svg)](https://phpackages.com/packages/kartik-v-yii2-sortable-input)
```

###  Alternatives

[kartik-v/yii2-sortable

Create sortable lists and grids using HTML5 drag and drop API for Yii 2.0.

433.8M13](/packages/kartik-v-yii2-sortable)[kartik-v/yii2-widget-rating

A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)

444.1M8](/packages/kartik-v-yii2-widget-rating)[kartik-v/yii2-widget-switchinput

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle switchinputes (sub repo split from yii2-widgets)

384.4M13](/packages/kartik-v-yii2-widget-switchinput)[kartik-v/yii2-widget-rangeinput

An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)

193.9M3](/packages/kartik-v-yii2-widget-rangeinput)[kartik-v/yii2-widget-touchspin

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle touchspines (sub repo split from yii2-widgets)

184.1M6](/packages/kartik-v-yii2-widget-touchspin)[kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

894.4M42](/packages/kartik-v-yii2-date-range)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
