PHPackages                             kadotafig/modal - 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. [Framework](/categories/framework)
4. /
5. kadotafig/modal

ActiveYii2-extension[Framework](/categories/framework)

kadotafig/modal
===============

Extension for the Yii2 framework

v1.1.5(8y ago)017MITJavaScript

Since Jan 12Pushed 4y agoCompare

[ Source](https://github.com/kadotafig/yii2-modal-form)[ Packagist](https://packagist.org/packages/kadotafig/modal)[ Docs](https://github.com/borodulin/yii2-modal-form)[ RSS](/packages/kadotafig-modal/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (8)Used By (0)

Yii2 Ajax modal form
====================

[](#yii2-ajax-modal-form)

Description
-----------

[](#description)

This extension allows you to quickly add full-featured modal forms to your appllication. Main featues are:

1. Based on bootstrap modal forms.
2. Allows quickly add behavior to interact with viewing and updating data in modal dialogs.
3. Catch form post events, converts them to ajax request and display results in the same modal dialog.

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

[](#installation)

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

To install, either run

```
$ php composer.phar require kadotafig/modal "*"

```

or add

```
"kadotafig/modal": "*"

```

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

Usage
-----

[](#usage)

Somewhere in the main layout

```
\kadotafig\modal\ModalForm::widget([
    'selector' => '.modal-form',
]);
```

Whenever you want to add behavior to tag a, just add class 'modal-form'

```
    echo Html::a('Some modal action', ['controller/action'], ['class' => 'modal-form']);
```

To improve traffic data and error exceptions you need to control layout rendering when ajax requests. I recommend you to override default rendering in your controllers:

```
class Controller extends \yii\web\Controller
{
    /**
     * Exclude layout rendering when ajax requests
     */
    public function render($view, $params = [])
    {
        if (\Yii::$app->request->isAjax) {
            return $this->renderPartial($view, $params);
        }
        return parent::render($view, $params);
    }
}
```

### Client Options

[](#client-options)

To add client options use `clientOptions` key. Available client options are: `id`, `class`, `tabindex`.

- Id key **replaces** existing auto generated id attribute.
- Class key **adds** classes to html class attribute.
- Tabindex key **replaces** existing default tabindex html attribute (-1), when false, then no tabindex attribute appears.

```
\kadotafig\modal\ModalForm::widget([
    'selector' => '.modal-form',
    'clientOptions' => [
        'id' => 'sample-unique-id',
        'class' => 'sample-class1 sample-class2',
        'tabindex' => false
    ]
]);

```

License
-------

[](#license)

**conquer/modal** is released under the MIT License. See the bundled `LICENSE` for details.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 82.4% 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 ~78 days

Recently: every ~115 days

Total

7

Last Release

2931d ago

### Community

Maintainers

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

---

Top Contributors

[![borodulin](https://avatars.githubusercontent.com/u/8121448?v=4)](https://github.com/borodulin "borodulin (42 commits)")[![kadotafig](https://avatars.githubusercontent.com/u/70489698?v=4)](https://github.com/kadotafig "kadotafig (8 commits)")[![paskuale75](https://avatars.githubusercontent.com/u/9800?v=4)](https://github.com/paskuale75 "paskuale75 (1 commits)")

---

Tags

yii2ajaxformmodal

### Embed Badge

![Health badge](/badges/kadotafig-modal/health.svg)

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

###  Alternatives

[conquer/modal

Extension for the Yii2 framework

1521.5k](/packages/conquer-modal)[skeeks/cms

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

13825.6k46](/packages/skeeks-cms)[marekpetras/yii2-ajax-box-widget

Ajax Box widget for Yii 2 Framework.

1814.6k](/packages/marekpetras-yii2-ajax-box-widget)[tecnocen/yii2-formgenerator

Yii 2 Library to configure form generator

145.7k](/packages/tecnocen-yii2-formgenerator)

PHPackages © 2026

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