__FresHmaN 2015-12-07 22:55:38 5437次浏览 0条评论 0 0 0

yii2-ajaxform

version
Download
Issues

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 enableAjaxSubmit is true
  • ajaxSubmitOptions you can find in jquery.form

Test

$ phpunit

LICENSE

MIT

Bitdeli Badge

    没有找到数据。
您需要登录后才可以评论。登录 | 立即注册