Pjax does not work well wich form

Pjax does not work well with form. Why?


if used as, page will be updated (does not work Pjax) :


use yii\helpers\Html;

use yii\widgets\ActiveForm;


<?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'name') ?>

    <?= $form->field($model, 'email') ?>

    <div class="form-group">

        <?= Html::submitButton('Отправить', ['class' => 'btn btn-primary']) ?>


<?php ActiveForm::end(); ?>

if used as, the page will not be updated (Works good Pjax):


use yii\helpers\Html;




How to fix it?