Before saving, I wanted to make a confirmation, I registered the data-confirm and now the window is called 2 times before sending the form

 <?php use yii\helpers\Html; use yii\widgets\ActiveForm; ?> <?php $form = ActiveForm::begin()?> <?= $form->field($model, 'name')->textInput() ?> <?= Html::submitButton('Сохранить', ['data-confirm' => 'Точно Сохранить'])?> <?php ActiveForm::end(); ?> 

What could be the problem, or is it a bug?

    1 answer 1

    Apparently, you have installed a not quite fresh version of yii2, since such a bug has long been started and fixed. https://github.com/yiisoft/yii2/commit/3abc07d16cb4f877cdff9e24d97269345a6c8b44

    Try upgrading to a newer version of the framework.

    • I just have the latest version of yii-basic-app-2.0.10 2.0.10 - Xfirab