public function getCategoryKurs() { return $this->hasOne(CategoryKurs::className(), ['category_kurs_id' => 'category_kurs_id']); }
<div class="kurs-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'kurs_name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'kurs_url'); ?> <?php echo $form->field($model, 'categoryKurs')->dropDownList(ArrayHelper::map(CategoryKurs::find()->all(), 'category_kurs_id', 'category_kurs_name')); ?> <?php echo $form->field($model, 'kursStatus')->dropDownList(ArrayHelper::map(KursStatus::find()->all(), 'kurs_status_id', 'kurs_status_name')); ?> <?php echo $form->field($model, 'kurs_brief')->textarea(); ?> <?php echo $form->field($model, 'kurs_subscribe')->textarea(); ?> <?php