Yii2框架Kartik CRUD Generator模板二次开
2017-08-03 本文已影响0人
chinariver
1.下拉选择框
echo$form->field($model,'video_typeautoid')->dropDownList(Videotypes::getAllTypes(),
['prompt'=>'请选择','style'=>'width:120px'])->label('视频分类:');
echo$form->field($model,'recommend')->dropDownList([0=>'否',1=>'是'],
['style'=>'width:120px']);
echo$form->field($model,'status')->dropDownList([1=>'上线',0=>'下线'],
['style'=>'width:120px'])->label('视频状态:');