PHPackages                             light/yii2-sweet-submit - 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. light/yii2-sweet-submit

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

light/yii2-sweet-submit
=======================

make yii2 form submit sweet

1.0.1(10y ago)2729081MITPHP

Since Nov 30Pushed 8y ago6 watchersCompare

[ Source](https://github.com/lichunqiang/yii2-sweet-submit)[ Packagist](https://packagist.org/packages/light/yii2-sweet-submit)[ RSS](/packages/light-yii2-sweet-submit/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (3)Used By (1)

 [ ![](https://avatars0.githubusercontent.com/u/993323) ](https://github.com/yiisoft)

Yii2 Sweeet Submit
==================

[](#yii2-sweeet-submit)

[![version](https://camo.githubusercontent.com/caea24ef851468f7e08bbd80979f0d9b040cee5cde09700ce01ac67107e03985/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c696768742f796969322d73776565742d7375626d69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/light/yii2-sweet-submit)[![Download](https://camo.githubusercontent.com/5306bd043fc6a90cf05ec1a27e3bb2cbe7931f7d14cd7ac5a0cb1f5d2893d339/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c696768742f796969322d73776565742d7375626d69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/light/yii2-sweet-submit)[![Issues](https://camo.githubusercontent.com/e77e20890fb4b1c4096ff17a60c36883f3aeddafaca863d8ea6839b869a9ac44/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c696368756e7169616e672f796969322d73776565742d7375626d69742e7376673f7374796c653d666c61742d737175617265)](https://github.com/lichunqiang/yii2-sweet-submit/issues)

By default `yii.js` using browser's `confirm` function to show confirm message.This library used `sweet-alert` to instead it:

[![before](./media/before.gif)](./media/before.gif)

[![after](./media/after.gif)](./media/after.gif)

Install
-------

[](#install)

```
$ composer require light\yii2-sweet-submit=*

```

Usage
-----

[](#usage)

you can depends this in your assets:

```
class AppAsset extends AssetBundle
{
    //..

    public $depends = [
        //your other depends
        'light\widgets\SweetSubmitAsset'
    ];
}

```

Or directly inject in the view:

```
use light\widgets\SweetSubmitAsset;

SweetSubmitAsset::register($this);

```

Once you had depends it in your project, `yii.swal` is available. What's this? It's just the [sweet-alert](http://t4t5.github.io/sweetalert/), now you can use it:

```
//your some.js
yii.swal('Opps. this is shown by sweet-alert');

```

There is more usage you can find from [document](http://t4t5.github.io/sweetalert/)

License
-------

[](#license)

[![MIT](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

3828d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ead2ef2c9862aa3d75a97de86af1e3cfa919886e8981bf0808cddd93f563777?d=identicon)[light](/maintainers/light)

---

Top Contributors

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

---

Tags

sweetalertyii2yii2-extensionyii2-sweetalertyii2-widgets

### Embed Badge

![Health badge](/badges/light-yii2-sweet-submit/health.svg)

```
[![Health](https://phpackages.com/badges/light-yii2-sweet-submit/health.svg)](https://phpackages.com/packages/light-yii2-sweet-submit)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)

PHPackages © 2026

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