PHPackages                             jwaldock/yii2-ajaxform - 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. jwaldock/yii2-ajaxform

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

jwaldock/yii2-ajaxform
======================

Provides AJAX submission for yii2 ActiveForm

11851PHP

Since Jun 29Pushed 9y ago2 watchersCompare

[ Source](https://github.com/jwaldock/yii2-ajaxform)[ Packagist](https://packagist.org/packages/jwaldock/yii2-ajaxform)[ RSS](/packages/jwaldock-yii2-ajaxform/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

ActiveForm AJAX Save Widget
===========================

[](#activeform-ajax-save-widget)

Provides AJAX save for yii2 ActiveForm

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

[](#installation)

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

Add

```
"repositories":[
    {
        "type": "git",
        "url": "https://github.com/jwaldock/yii2-ajaxform"
        "url": "https://path.to/your/repo"
    }
]

```

to your `composer.json` file.

Either run

```
php composer.phar require jwaldock/yii2-ajaxform:dev-master

```

or add.

```
"jwaldock/yii2-ajaxform": "dev-master"

```

```
"repositories":[
    {
        "type": "git",
        "url": "https://path.to/your/repo"
    }
]

```

to your `composer.json` file.

Either run

```
php composer.phar require jwaldock/yii2-ajaxform:dev-master

```

or add.

```
"jwaldock/yii2-ajaxform": "dev-master"

```

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

Usage
-----

[](#usage)

Set up AJAX validation for your

`yiiAjaxForm` provides three events `submitBegin`, `submitEnd` and `submitFailed`. Event handlers for these events should have the following function signatures:

```
// 'submitBegin' event
function (event) {
    // handle submission begin
}
```

```
// 'submitEnd' event
function (event, success, modeldata) {
    if (success) {
        // handle successful save
        return
    }
    // handle failed save
}
```

```
// submitFailed
function (event, xhr) {
    // handle failure
}
```

```
public function actions()
{
   return [
       'submit-model' => [
           'class' => 'jwaldock\ajaxform\AjaxSubmitAction',
           'modelClass' => 'model', // the fully qualified class name of the model
           'tabular' => true, // set to true if using a tabular form - defaults to false
           'scenario' => 'model-scenario' // optional model scenario
       ],
       // other actions
   ];
}
```

```

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

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://avatars.githubusercontent.com/u/7036147?v=4)[Joel Waldock](/maintainers/jwaldock)[@jwaldock](https://github.com/jwaldock)

---

Top Contributors

[![jwaldock](https://avatars.githubusercontent.com/u/7036147?v=4)](https://github.com/jwaldock "jwaldock (11 commits)")

### Embed Badge

![Health badge](/badges/jwaldock-yii2-ajaxform/health.svg)

```
[![Health](https://phpackages.com/badges/jwaldock-yii2-ajaxform/health.svg)](https://phpackages.com/packages/jwaldock-yii2-ajaxform)
```

###  Alternatives

[phpactor/language-server

Generic Language Server Platform

56488.8k9](/packages/phpactor-language-server)

PHPackages © 2026

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