Skip to content
Yii2 JsonEditor widget uses Json Editor plugin for jQuery
JavaScript PHP CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

JsonEditor widget for Yii2 Framework uses Json Editor plugin for jQuery

JsonEditor widget demo page

The extension uses Json Editor plugin by Author Jadesoul for jQuery and makes user interface for changing json values.

JsonEditor widget


The preferred way to install this extension is through composer.

Either run:

composer require slavkovrn/yii2-jsoneditor

or add

"slavkovrn/yii2-jsoneditor": "*"

to the require section of your composer.json file.


Set link to extension in your view:

use slavkovrn\jsoneditor\JsonEditorWidget;
use yii\widgets\ActiveForm;
use yii\helpers\Html;
    <?php $ form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'username')->widget(JsonEditorWidget::class,[
        'rootNodeName' => 'root1',
    ]) ?>

    <?= $form->field($model, 'email')->widget(JsonEditorWidget::class,[
        'rootNodeName' => 'root2',
    ]) ?>

    <div class="form-group">
        <?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>

    <?php ActiveForm::end(); ?>

write comments to admin

You can’t perform that action at this time.