light/yii2-ajaxform
最新稳定版本:1.0.3
Composer 安装命令:
composer require light/yii2-ajaxform
包简介
yii2 activeform ActiveForm ajax
README 文档
README
Yii2 Ajax Form
Overview
Using jquery.form to make ActiveForm has ability to submit via ajax but not fullpage reload.
Install
Using composer:
$ composer require light/yii2-ajaxform=*
Usage
use light\widgets\ActiveForm; use yii\web\JsExpression; ActiveForm::begin([ 'ajaxSubmitOptions' => [ 'success' => new JsExpression('function(response) {console.log(response)}'), 'complete' => new JsExpression('function() {console.log("request completed.")}') ] ])
Options
- Default enabled
enableAjaxSubmitis true ajaxSubmitOptionsyou can find in jquery.form
Test
$ phpunit
LICENSE
统计信息
- 总下载量: 4.55k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 22
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-30