Exemplo n.º 1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getResearchType()
 {
     return @$this->hasOne(ResearchType::className(), ['id' => 'type_id']);
 }
Exemplo n.º 2
0
?>

    <div class="row">
        <div class="col-md-6"><?php 
echo $form->field($model, 'name_th')->textArea(['maxlength' => true]);
?>
</div>
        <div class="col-md-6"> <?php 
echo $form->field($model, 'name_en')->textArea(['maxlength' => true]);
?>
</div>
    </div>
    <div class="row">
        <div class="col-md-6">
             <?php 
echo $form->field($model, 'type_id')->dropDownList(ArrayHelper::map(ResearchType::find()->all(), 'id', 'name'), ['prompt' => 'เลือกประเภทงานวิจัย...']);
?>
        </div>
        <div class="col-md-6">
            <?php 
echo $form->field($model, 'fund_id')->dropDownList(ArrayHelper::map(ResearchFund::find()->all(), 'id', 'name'), ['prompt' => 'เลือกแหล่งเงินทุน...']);
?>
        </div>
    </div>

    <?php 
echo $form->field($model, 'fund_description')->textArea(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'detail')->textArea(['maxlength' => true]);
?>