light/yii2-ajaxform yii2 activeform ActiveForm ajax

993323

Yii2 Ajax Form

  1. Overview
  2. Install
  3. Usage
  4. Test
  5. LICENSE

Build Status 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

1 0
1 follower
4 372 downloads
Yii Version: 2.0
License: MIT
Category: Others
Developed by: __FresHmaN __FresHmaN
Created on: Apr 14, 2018
Last updated: (not set)
Packagist Profile
Github Repository

Related Extensions