PHPackages                             wardany/dform - 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. wardany/dform

ActiveYii2-extension

wardany/dform
=============

Dynamic form builder is a full module to inject new attributes to any model you want, and you can manipulate this new attributes in the backend, and many other features.

00PHP

Since Feb 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/m-wardany/yii2-dynamic-form-builder)[ Packagist](https://packagist.org/packages/wardany/dform)[ RSS](/packages/wardany-dform/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Dynamic Form Builder for yii2
=============================

[](#dynamic-form-builder-for-yii2)

Dynamic form builder is a full module to inject new attributes to any model you want, and you can manipulate this new attributes in the backend, and many other features.

- add server/client side validations
- determine searchable attributes
- select the desired widget or input to be displayed in the form or search
- easy to search

### Installation

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist wardany/dynamic-form-builder "*"

```

or add

```
"wardany/dynamic-form-builder": "*"

```

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

run migration

```
php yii migrate --migrationPath=@wardany/dform/migrations

```

add to your backend/config

```
'modules' => [
        'dynamic_form_builder' => [
            'class' => 'wardany\dform\DynamicFormBuilder',
        ],
],

```

now you can start add forms by going to the link `/dynamic_form_builder/forms/index`.

### Create models

[](#create-models)

to start use the form builder, for example you need to add attributes to the model **Post**

- first create values table eg. '**posts\_values**', this table must contains the following columns: -- input\_id (integer) // you may need to create foreign key to the table 'dynamic\_form\_inputs' -- value (text / json)
- add relation to the `Post` model : ```
    public function getValues(){
        return $this->hasMany(\wardany\dform\models\DynamicForm::className(), ['id' => 'input_id'])
            ->viaTable('post_values', ['post_id'=> 'id']);
    }

    ```
- add `DynamicFormBuilderBehavior` to the Model ```
      public function behaviors() {
            return[
                ...
                \wardany\dform\behaviors\DynamicFormBuilderBehavior::className(),
                ...
            ];
        }

    ```
- in the form page call the form drower widget ```

    ```
- add `DynamicFormSearchBehavior` to the search model ```
      public function behaviors() {
            return[
                ...
                [
                    'class'=> \wardany\dform\behaviors\DynamicFormSearchBehavior::className(),
                    'values_table'=> PostValues::tableName(),
                    'relation_input'=> 'post_id'
                ]
                ...
            ];
        }

    ```
- in the form page call the form drower widget ```

    ```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/62061cc94e4ea6fcf80a6bf56a7835adcd1ec7cc8fd7bb949481764af63f6438?d=identicon)[muhammad wardany](/maintainers/muhammad%20wardany)

---

Top Contributors

[![m-wardany](https://avatars.githubusercontent.com/u/13200083?v=4)](https://github.com/m-wardany "m-wardany (4 commits)")

### Embed Badge

![Health badge](/badges/wardany-dform/health.svg)

```
[![Health](https://phpackages.com/badges/wardany-dform/health.svg)](https://phpackages.com/packages/wardany-dform)
```

PHPackages © 2026

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