Answer the question
In order to leave comments, you need to log in
How to replace text in help-block form?
There is a form
<?php $form = ActiveForm::begin([
'action' => '/feedback',
'options' => [
'class' => 'form-inline',
'method' => 'post',
'id' => 'orderform'
]
]);?>
<?= $form->field($model, 'name')->textInput(['placeholder'=>'Ваше имя'])->label(false) ?>
<?= $form->field($model, 'email')->textInput(['placeholder'=>'E-mail'])->label(false) ?>
<?= $form->field($model, 'phone')->textInput(['placeholder'=>'Номер телефона'])->label(false) ?>
<?= Html::submitButton('проконсультироваться') ?>
<?php ActiveForm::end(); ?>
public function rules()
{
return [
[['name', 'email', 'phone'], 'string', 'max' => 255],
[['name', 'email', 'phone'], 'required'],
];
}
Answer the question
In order to leave comments, you need to log in
public function rules(){
return [
[['name', 'email', 'phone'], 'string', 'max' => 255],
[['name', 'email', 'phone'], 'required', 'message' => 'Это текст сообщения'],
];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question