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>
<?= $form->field($model, 'some_column')->dropdownList(['1' => 'aaa', '2' => 'bbb'], ['prompt' => '---Select Data---'])?>
here is yii2 dropdown's simplest view
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.