PHPackages                             kotchuprik/yii2-x-editable - 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. kotchuprik/yii2-x-editable

ActiveYii2-extension

kotchuprik/yii2-x-editable
==========================

X-editable extensions for Yii 2. Fork marciocamello/yii2-x-editable with some features.

v1.0(11y ago)11711BSD-3-ClauseJavaScript

Since Aug 20Pushed 11y ago1 watchersCompare

[ Source](https://github.com/kotchuprik/yii2-x-editable)[ Packagist](https://packagist.org/packages/kotchuprik/yii2-x-editable)[ RSS](/packages/kotchuprik-yii2-x-editable/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

kotchuprik X-Editable
=====================

[](#kotchuprik-x-editable)

X-editable extensions for Yii 2, based in X-editable 1.5.1 with Bootstrap 3 Link from project -

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

[](#installation)

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

Either run

```
php composer.phar require kotchuprik/yii2-x-editable "dev-master"

```

or add

```
"kotchuprik/yii2-x-editable": "*"

```

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

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

Actions
-------

[](#actions)

```
public function actions()
{
    return [
        'editable' => [
            'class' => XEditableAction::className(),
            //'scenario' => 'editable',  //optional
            'modelClass' => Model::className(),
        ],
    ];
}
```

Text whitout model
------------------

[](#text-whitout-model)

```
echo \kotchuprik\xeditable\widgets\TextField::widget([
    'value' => 'With XEditableText',
]);
```

Text
----

[](#text)

```
echo \kotchuprik\xeditable\widgets\TextField::widget([
    'model' => $model,
    'placement' => 'right',
    'pluginOptions' => [
        'name' => 'title',
    ],
    'callbacks' => [
        'validate' => new \yii\web\JsExpression('
            function(value) {
                if($.trim(value) == "") {
                    return "This field is required";
                }
            }
        ')
    ]
]);
```

Text Toggle Manual
------------------

[](#text-toggle-manual)

```
echo \kotchuprik\xeditable\widgets\TextField::widget([
    'model' => $model,
    'placement' => 'right',
    'pluginOptions' => [
        'toggle' => 'manual',
        'name' => 'title',
    ],
    'callbacks' => [
        'validate' => new \yii\web\JsExpression('
            function(value) {
                if($.trim(value) == "") {
                    return "This field is required";
                }
            }
        ')
    ]
]);
```

TextArea
--------

[](#textarea)

```
echo \kotchuprik\xeditable\widgets\TextArea::widget([
    'model' => $model,
    'placement' => 'right',
    'pluginOptions' => [
        'name' => 'content',
    ],
]);
```

Select
------

[](#select)

```
echo \kotchuprik\xeditable\widgets\Select::widget([
    'model' => $model,
    'placement' => 'right',
    'pluginOptions' => [
        'name' => 'status',
        'source'=>[
            [
                'value' => 1,
                'text' => Yii::t('app', 'On'),
            ],
            [
                'value' => 0,
                'text' => Yii::t('app', 'Off'),
            ],
        ],
    ],
]);
```

Date
----

[](#date)

```
echo \kotchuprik\xeditable\widgets\Date::widget([
    'model' => $model,
    'placement' => 'right',
    'pluginOptions' => [
        'name' => 'created_at',
        'value' => date('Y-m-d', $model->created_at),
        'format' => 'yyyy-mm-dd',
        'viewformat' => 'dd/mm/yyyy',
        'datepicker' => [
            [
                'weekStart' => 1,
            ],
        ],
    ],
]);
```

DateTime
--------

[](#datetime)

```
echo \kotchuprik\xeditable\widgets\DateTime::widget([
    'model' => $model,
    'placement' => 'right',
    'pluginOptions' => [
        'name' => 'created_at',
        'value' => date('Y-m-d h:i', $model->created_at),
        'format' => 'yyyy-mm-dd hh:ii',
        'viewformat' => 'dd/mm/yyyy hh:ii',
        'datepicker' => [
            [
                'weekStart' => 1,
            ],
        ],
    ],
]);
```

ComboDate
---------

[](#combodate)

```
echo \kotchuprik\xeditable\widgets\ComboDate::widget([
    'model' => $model,
    'placement' => 'right',
    'type' => 'combodate',
    'pluginOptions' => [
        'name' => 'created_at',
        'value' => date('Y-m-d h:i', $model->created_at),
        'format' => 'YYYY-MM-DD HH:mm',
        'viewformat' => 'MMM DD, YYYY HH:mm',
        'template' => 'DD / MMM / YYYY HH:mm',
        'combodate' => [
            [
                'minYear' => 2000,
                'maxYear' => 2015,
                'minuteStep' => 1,
            ],
        ],
    ]
]);
```

Checklist
---------

[](#checklist)

```
echo \kotchuprik\xeditable\widgets\CheckList::widget([
    'model' => $model,
    'placement' => 'right',
    'pluginOptions' => [
        'name' => 'image',
        'source' => [
            [
                'value' => 'option1',
                'text' => Yii::t('app', 'option1'),
            ],
            [
                'value' => 'option2',
                'text' => Yii::t('app', 'option2'),
            ],
            [
                'value' => 'option3',
                'text' => Yii::t('app', 'option3'),
            ],
        ],
    ],
]);
```

HTML Editor - WysiHtml5
-----------------------

[](#html-editor---wysihtml5)

```
echo \kotchuprik\xeditable\widgets\WysiHtml5::widget([
    'model' => $model,
    'pluginOptions' => [
        'toggle' => 'manual',
        'name' => 'content',
        'title' => 'Enter comments',
    ],
]);
```

Select2
-------

[](#select2)

```
$items = [
    [
        'value' => 'gb',
        'text' => Yii::t('app', 'Great Britain'),
    ],
    [
        'value' => 'us',
        'text' => Yii::t('app', 'United States')],
    [
        'value' => 'ru',
        'text' => Yii::t('app', 'Russia'),
    ]
];

echo XEditable::widget([
    'placement' => 'right',
    'type' => 'select2',
    'pluginOptions' => [
        'value' => 'ru',
        'source'=> $items,
        'select2' => [
            'multiple' => true
        ],
    ]
]);
```

TypeAheadJs
-----------

[](#typeaheadjs)

```
$items = [
    [
        'value' => 'gb',
        'text' => Yii::t('app', 'Great Britain'),
    ],
    [
        'value' => 'us',
        'text' => Yii::t('app', 'United States'),
    ],
    [
        'value' => 'ru',
        'text' => Yii::t('app', 'Russia'),
    ],
];

echo XEditable::widget([
    'placement' => 'right',
    'type' => 'typeaheadjs',
    'pluginOptions' => [
        'value' => 'ru',
        'typeahead' => [
            'name' => 'country',
            'local' => $items,
        ],
    ]
]);
```

DataGrid
--------

[](#datagrid)

```
$provider = new \yii\data\ActiveDataProvider([
    'query' => Categories::find(),
    'pagination' => [
        'pageSize' => 4,
    ],
]);

echo GridView::widget([
    'id' => Yii::$app->controller->id,
    'dataProvider' => $provider,
    'columns' => [
        [
            'value' => function($model) {
                return $model->active;
            },
            'class' => XEditableColumn::className(),
            'url' => 'editable',
            'dataType' => 'select',
            'editable'=>[
                'source'=>[
                    [
                        'value' => 1,
                        'text' => Yii::t('app', 'On'),
                    ],
                    [
                        'value' => 0,
                        'text' => Yii::t('app', 'Off'),
                    ],
                ],
                'placement' => 'right',
            ],
            'attribute' => 'status',
            'format' => 'raw',
        ],
        'title',
    ],
]);
```

Features
--------

[](#features)

- Server-side validation support (error messages output after validation).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

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

Unknown

Total

1

Last Release

4284d ago

### Community

Maintainers

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

---

Top Contributors

[![marciocamello](https://avatars.githubusercontent.com/u/4071580?v=4)](https://github.com/marciocamello "marciocamello (42 commits)")[![chuprik](https://avatars.githubusercontent.com/u/802946?v=4)](https://github.com/chuprik "chuprik (11 commits)")[![sieppl](https://avatars.githubusercontent.com/u/837595?v=4)](https://github.com/sieppl "sieppl (1 commits)")

---

Tags

yii2extensionx-editable

### Embed Badge

![Health badge](/badges/kotchuprik-yii2-x-editable/health.svg)

```
[![Health](https://phpackages.com/badges/kotchuprik-yii2-x-editable/health.svg)](https://phpackages.com/packages/kotchuprik-yii2-x-editable)
```

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[wbraganca/yii2-tagsinput

The yii2-tagsinput is a Yii 2 wrapper for \[bootstrap-tagsinput\](https://github.com/timschlechter/bootstrap-tagsinput). A user interface for managing tags.

32160.2k](/packages/wbraganca-yii2-tagsinput)[maxmirazh33/yii2-uploadable-cropable-image

Yii2 extension for upload and crop images

1020.8k](/packages/maxmirazh33-yii2-uploadable-cropable-image)

PHPackages © 2026

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