-2

here i want to select Airline from a list this is the code:

        <div class="col-lg-2">
          <?= $form->field($model, 'Airline') ?>  
        </div>
        <div class="col-lg-2">
            <?= Html::label('Bdate', 'Bdate') ?>              
            <?= Html::activeInput('date', $model ,'Bdate',['class'=>'form-control']) ?>
        </div>
Younes
  • 3
  • 4
  • 2
    Does this answer your question? [How to make a drop down list in yii2?](https://stackoverflow.com/questions/21569053/how-to-make-a-drop-down-list-in-yii2) – Definitely not Rafal Apr 29 '21 at 13:09

1 Answers1

0

<?= $form->field($model, 'some_column')->dropdownList(['1' => 'aaa', '2' => 'bbb'], ['prompt' => '---Select Data---']) ?> here is yii2 dropdown's simplest view