There is the following code:

<div id="newsletter"> <?php $form = \yii\bootstrap\ActiveForm::begin([ 'options' => [ 'class' => 'form-inline' ] ]) ?> <?= $form->field($model, 'email')->input('email')->label(false) ?> <?= \yii\bootstrap\Html::submitButton('Сообщить', ['class' => 'btn btn-warning btn-lg']) ?> <?php $form->end() ?> </div> 

enter image description here

The error message is displayed under the email input field, but it is necessary that the message be displayed under the button. Help me please.

  • The position of the error is styled through CSS. - Zhukov Roman
  • I did this: I do not display an error under the field using the template ['template' => "{label} \ n {input} \ n {hint}"], and at the end through <? = $ Form-> errorSummary ($ model, ['header' => '', 'class' => 'has-error']); ?> - Mykhailo Fiialka

0