PHPackages                             bupy7/yii2-dynamic-fields - 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. bupy7/yii2-dynamic-fields

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

bupy7/yii2-dynamic-fields
=========================

Widget for display dynamic fields, adding and removing their use Pjax.

1.0.2(8y ago)546.4k17[2 issues](https://github.com/bupy7/yii2-dynamic-fields/issues)BSD-3-ClausePHP

Since Mar 27Pushed 8y ago12 watchersCompare

[ Source](https://github.com/bupy7/yii2-dynamic-fields)[ Packagist](https://packagist.org/packages/bupy7/yii2-dynamic-fields)[ Docs](https://github.com/bupy7/yii2-dynamic-fields)[ RSS](/packages/bupy7-yii2-dynamic-fields/feed)WikiDiscussions master Synced 1mo ago

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

yii2-dynamic-fields
===================

[](#yii2-dynamic-fields)

Widget for display dynamic fields, adding and removing their use Pjax.

[![Screenshot](screenshot.png)](screenshot.png)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist bupy7/yii2-dynamic-fields "*"

```

or add

```
"bupy7/yii2-dynamic-fields": "*"

```

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

Usage
-----

[](#usage)

Add following code to your view:

```
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use bupy7\dynafields\DynaFields;

$form = ActiveForm::begin(['action' => ['index']]);

echo DynaFields::widget([
    'urlAdd' => ['your-action-add'],
    'urlRemove' => ['your-action-remove'],
    'inputMethod' => 'textInput',
    'inputMethodArgs' => [['maxlength' => true]],
    'form' => $form,
    'models' => $models,
    'attribute' => 'attribute',
]);

echo Html::submitButton('Save', ['class' => 'btn btn-success']);

ActiveForm::end();
```

Added following code to your controller:

```
use Yii;
use yii\base\Model;

/**
 * Render form.
 */
public function actionIndex()
{
    $models = ModelName::find()->all();
    if (Model::loadMultiple($models, Yii::$app->request->post()) && Model::validateMultiple($models)) {
        for ($i = 0; $i != count($models); $i++) {
            $models[$i]->save(false);
        }
        return $this->redirect(['index']);
    }
    return $this->render('index', ['models' => $models]);
}

/**
 * Create new model.
 */
public function actionYourActionAdd()
{
    $model = new ModelName;
    $model->save(false);
    return $this->actionIndex();
}

/**
 * Delete model.
 * @param int $id
 */
public function actionYourActionRemove($id)
{
    ModelName::findOne($id)->delete();
    return $this->actionIndex();
}
```

\##License

yii2-dynamic-fields is released under the BSD 3-Clause License.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity65

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 ~547 days

Total

3

Last Release

2976d ago

### Community

Maintainers

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

---

Top Contributors

[![bupy7](https://avatars.githubusercontent.com/u/5145037?v=4)](https://github.com/bupy7 "bupy7 (22 commits)")

---

Tags

dynamicfieldsyii2yii2extensionwidgetfieldsdynamicmultiplepjax

### Embed Badge

![Health badge](/badges/bupy7-yii2-dynamic-fields/health.svg)

```
[![Health](https://phpackages.com/badges/bupy7-yii2-dynamic-fields/health.svg)](https://phpackages.com/packages/bupy7-yii2-dynamic-fields)
```

###  Alternatives

[drsdre/yii2-wizardwidget

Multi step wizard widget using tabs to guide a user through steps to complete a task. Based on the Form wizard (using tabs) from lukepzak (see http://bootsnipp.com/snippets/featured/form-wizard-using-tabs).

37147.9k](/packages/drsdre-yii2-wizardwidget)

PHPackages © 2026

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