php - Display dropdownlist filter data? -
<?= $form->field($model, 'srf_student_id')->dropdownlist( arrayhelper::map(studentdetails::find()->all(),'student_registration_id','student_registration_id'), ['prompt'=>'select student id']); ?>
how set condition in dropdownlist. want select student_registration_id studentdetails is_select = 0; data result set dropdownlist. please give me help.
try this:
<?= $form->field($model, 'srf_student_id')->dropdownlist( arrayhelper::map(studentdetails::find()->where(['is_select' => 0])->all(),'student_registration_id','student_registration_id'), ['prompt'=>'select student id']); ?>
Comments
Post a Comment