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 3w ago

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 57% 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

2986d 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

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[yiisoft/yii2-redis

Redis Cache, Session and ActiveRecord for the Yii framework

47912.3M278](/packages/yiisoft-yii2-redis)[yiisoft/yii2-app-advanced

Yii 2 Advanced Project Template

1.7k961.7k5](/packages/yiisoft-yii2-app-advanced)[yiisoft/yii2-app-basic

Yii 2 Basic Project Template

7101.8M8](/packages/yiisoft-yii2-app-basic)[conquer/modal

Extension for the Yii2 framework

1522.2k](/packages/conquer-modal)[yiisoft/yii2-apidoc

API Documentation generator for the Yii framework 2.0

260712.7k31](/packages/yiisoft-yii2-apidoc)

PHPackages © 2026

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