Hi, I don’t know if this is a bug in the dropdownlist,or maybe I am just wrong.
if I use the compid in the second parameter,I could not get the value of option.but if I change to comp_name in the second parameter i can get the value of my option list.
<?= Html::activeDropDownList($modelcompany,'compid', ArrayHelper::map($modelcompany::find()->all(), 'compid', 'comp_name'),
['prompt'=>'----select company----']) ?>
please correct me if I am wrong.