Answer the question
In order to leave comments, you need to log in
How to change error display location in yii2?
i have two fields
<div class="date-range">
<?= $form->field($model, 'date_from', [
'options' => [
'class' => 'date-control form-group',
]
])->textInput([
'class' => 'form-control date-range-start empty',
'placeholder' => Yii::t('main', 'there')
])->label(false) ?>
<?= $form->field($model, 'date_till', [
'options' => [
'class' => 'date-control form-group'
],
])->textInput([
'class' => 'form-control date-range-end empty',
'placeholder' => Yii::t('main', 'back')
])->label(false) ?>
</div>
<div class="message-block"></div>
Answer the question
In order to leave comments, you need to log in
<?= $form->field($model, 'date_from', [
'options' => [ 'class' => 'date-control form-group',],
'errorOptions' => ['tag' => 'span', 'class' => 'has-error__text']
])?>
error display class
<?php $form = ActiveForm::begin([
'errorSummaryCssClass' => 'someMyClass'
]); ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question