PHPackages                             itstructure/yii2-field-widgets - 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. [Templating &amp; Views](/categories/templating)
4. /
5. itstructure/yii2-field-widgets

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

itstructure/yii2-field-widgets
==============================

The form field widgets for Yii2 Framework with multilanguage mode support.

1.2.5(6mo ago)21.3k13MITPHPPHP &gt;=7.1.0

Since Feb 4Pushed 6mo agoCompare

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

READMEChangelog (3)Dependencies (3)Versions (9)Used By (3)

Yii2 Field widgets
==================

[](#yii2-field-widgets)

Introduction
------------

[](#introduction)

[![Latest Stable Version](https://camo.githubusercontent.com/28008543fbeef4906272b01af063c8788b111f79bb283dc8eb7cf3146c625ae7/68747470733a2f2f706f7365722e707567782e6f72672f69747374727563747572652f796969322d6669656c642d776964676574732f762f737461626c65)](https://packagist.org/packages/itstructure/yii2-field-widgets)[![Latest Unstable Version](https://camo.githubusercontent.com/c3cbc751dbd64e153eaf85ac278abd7ed72a3d528f7b41bd0062a8f88d12126c/68747470733a2f2f706f7365722e707567782e6f72672f69747374727563747572652f796969322d6669656c642d776964676574732f762f756e737461626c65)](https://packagist.org/packages/itstructure/yii2-field-widgets)[![License](https://camo.githubusercontent.com/af3e1108a3a6103ed1bd5e3b9c764f65b8d78d01916ca2279d15ffc574c33a79/68747470733a2f2f706f7365722e707567782e6f72672f69747374727563747572652f796969322d6669656c642d776964676574732f6c6963656e7365)](https://packagist.org/packages/itstructure/yii2-field-widgets)[![Total Downloads](https://camo.githubusercontent.com/84996f59a9d5c3c0752e2a1ac312a1582e3fdfd63ca4c18fb58b01ba43b925dc/68747470733a2f2f706f7365722e707567782e6f72672f69747374727563747572652f796969322d6669656c642d776964676574732f646f776e6c6f616473)](https://packagist.org/packages/itstructure/yii2-field-widgets)[![Build Status](https://camo.githubusercontent.com/0d4f050d16156d19ba0706bb75cc04897fea3dcea2223bdc572035871708624f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69747374727563747572652f796969322d6669656c642d776964676574732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/itstructure/yii2-field-widgets/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/deeefdfe44f4aebdcd21b3c1eef87b80e2a18e7d63f74171348cae0d7769f1ad/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69747374727563747572652f796969322d6669656c642d776964676574732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/itstructure/yii2-field-widgets/?branch=master)

This is form field's widgets for the Yii2 v2.0.x framework with the next field types:

- text
- textarea
- ckeditor
- ckeditorAdmin
- file
- checkbox
- dropdown
- password

Dependencies
------------

[](#dependencies)

- php &gt;= 7.1
- composer

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

[](#installation)

### Base install

[](#base-install)

Via composer:

`composer require "itstructure/yii2-field-widgets": "~1.2.5"`

or in section **require** of composer.json file set the following:

```
"require": {
    "itstructure/yii2-field-widgets": "~1.2.5"
}
```

and command `composer install`, if you install yii2 project extensions first,

or command `composer update`, if all yii2 project extensions are already installed.

### If you are testing this package from local server directory

[](#if-you-are-testing-this-package-from-local-server-directory)

In application `composer.json` file set the repository, like in example:

```
"repositories": [
    {
        "type": "path",
        "url": "../yii2-field-widgets",
        "options": {
            "symlink": true
        }
    }
],
```

Here,

**yii2-field-widgets** - directory name, which has the same directory level like application and contains yii2 field widgets package.

Then run command:

`composer require itstructure/yii2-field-widgets:dev-master --prefer-source`

Usage
-----

[](#usage)

### Requirements

[](#requirements)

That widgets are designed to work in form with an active **model**, which is inherited from yii\\db\\ActiveRecord.

### Single mode

[](#single-mode)

To use this mode, don't set `languageModel`. That will be **null**.

### Multilanguage mode

[](#multilanguage-mode)

All fields will be with a language postfix:

**title\_en**

**description\_en**

**title\_ru**

**description\_ru**, e t. c.

For this mode it's necessary to have Language model with some of languages records.

Example:

```
$form = ActiveForm::begin();
```

```
echo Fields::widget([
    'fields' => [
        [
            'name' => 'title',
            'type' => FieldType::FIELD_TYPE_TEXT,
        ],
        [
            'name' => 'description',
            'type' => FieldType::FIELD_TYPE_CKEDITOR_ADMIN,
            'preset' => 'full',
            'options' => [
                'filebrowserBrowseUrl' => '/ckfinder/ckfinder.html',
                'filebrowserImageBrowseUrl' => '/ckfinder/ckfinder.html?type=Images',
                'filebrowserUploadUrl' => '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
                'filebrowserImageUploadUrl' => '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
                'filebrowserWindowWidth' => '1000',
                'filebrowserWindowHeight' => '700',
            ]
        ],
    ],
    'model'         => $model,
    'form'          => $form,
    'languageModel' => new Language()
]) ?>
```

```
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
```

```
ActiveForm::end();
```

License
-------

[](#license)

Copyright © 2018-2025 Andrey Girnik .

Licensed under the [MIT license](http://opensource.org/licenses/MIT). See LICENSE.txt for details.

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance70

Regular maintenance activity

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~402 days

Recently: every ~657 days

Total

8

Last Release

201d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31563329?v=4)[Andrey Girnik](/maintainers/itstructure)[@itstructure](https://github.com/itstructure)

---

Top Contributors

[![itstructure](https://avatars.githubusercontent.com/u/31563329?v=4)](https://github.com/itstructure "itstructure (10 commits)")

---

Tags

fieldmultilanguagewidgetyii2yii2multilanguagewidgetfieldyii 2

### Embed Badge

![Health badge](/badges/itstructure-yii2-field-widgets/health.svg)

```
[![Health](https://phpackages.com/badges/itstructure-yii2-field-widgets/health.svg)](https://phpackages.com/packages/itstructure-yii2-field-widgets)
```

###  Alternatives

[vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

243979.7k40](/packages/vova07-yii2-imperavi-widget)[kartik-v/yii2-widget-activeform

Enhanced Yii2 active-form and active-field with full bootstrap styling support (sub repo split from yii2-widgets).

647.3M62](/packages/kartik-v-yii2-widget-activeform)[artkost/yii2-trumbowyg

The Trumbowyg WYSIWYG Editor widget for yii2 framework

2418.3k](/packages/artkost-yii2-trumbowyg)[marekpetras/yii2-calendarview-widget

CalendarView widget for Yii 2 Framework.

2229.1k](/packages/marekpetras-yii2-calendarview-widget)[marqu3s/yii2-summernote

Yii2 Summernote widget. Super simple WYSIWYG editor on Bootstrap

1691.6k8](/packages/marqu3s-yii2-summernote)

PHPackages © 2026

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