Pjax does not work well wich form

Pjax does not work well with form. Why?

look:

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


<?php

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']) ?>

    </div>

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

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




<?php

use yii\helpers\Html;

?>


    

    <p>test</p>

How to fix it?