Answer the question
In order to leave comments, you need to log in
Auto-complete fields on form generation yii2?
there is such an ActiveForm field
<?= $form
->field($model, 'part_number')
->textInput([
'maxlength' => true,
'id' => 'input2',
'class' => 'form-control',
'placeholder' => html::encode($model->getAttributeLabel('part_number')),
'required' => 'required'
])
->label(false) ?>
Answer the question
In order to leave comments, you need to log in
<?= $form
->field($model, 'part_number')
->textInput([
'maxlength' => true,
'id' => 'input2',
'class' => 'form-control',
'placeholder' => html::encode($model->getAttributeLabel('part_number')),
'required' => 'required',
'value' => 'какой то текст'
])
->label(false) ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question