?> <div class="tbleditors-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'editor_name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'country_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Tblcountries::find()->all(), 'country_id', 'country_name'), 'options' => ['placeholder' => 'Select country'], 'pluginOptions' => ['allowClear' => true]]); ?> <?php echo $form->field($model, 'education_level_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Tbleducation::find()->all(), 'education_level_id', 'level_name'), 'options' => ['placeholder' => 'Select Education Certification'], 'pluginOptions' => ['allowClear' => true]]); ?> <?php echo $form->field($model, 'education_institution')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'stars')->radioList(array('1' => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5')); ?> <?php echo $form->field($model, 'mobile')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'email')->textInput(['maxlength' => true]); ?> <?php
/** * @return \yii\db\ActiveQuery */ public function getEducationLevel() { return $this->hasOne(Tbleducation::className(), ['education_level_id' => 'education_level_id']); }
/** * Finds the Tbleducation model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return Tbleducation the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = Tbleducation::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }