PHPackages                             swiatprzesylek/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. swiatprzesylek/yii2-sortable-input

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

swiatprzesylek/yii2-sortable-input
==================================

Sortable input widget based on yii2-sortable extension.

083PHP

Since Jul 31Pushed 2y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

 [ ![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

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 Bus Factor1

Top contributor holds 75% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a73ab244a55f62a45aa41eb471b2fa206ac4edf39308b94c4b7442afb8eaa0af?d=identicon)[swiatprzesylek](/maintainers/swiatprzesylek)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[laracrafts/laravel-url-shortener

Powerful URL shortening tools in Laravel

97110.7k](/packages/laracrafts-laravel-url-shortener)[ffi/location

PHP library for determining the physical location of binaries

1339.8k7](/packages/ffi-location)

PHPackages © 2026

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