yii2 ajaxform
1.0.2
ActiveForm 만들기 위해 jquery.form 사용하면 ajax를 통해 제출할 수 있지만 전체 페이지를 다시 로드할 수는 없습니다.
작곡가 사용:
$ composer require light/yii2-ajaxform=*
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.")} ' )
]
])enableAjaxSubmit 은 true입니다.ajaxSubmitOptions jquery.form에서 찾을 수 있습니다. $ phpunit