echo $form->field($model, 'functions')->dropDownList($jobFunctions, ['prompt' => Yii::t('job', '--- Select at least one ---')]); ?> <div class="form-group"> <label class="control-label col-sm-3"></label> <div class="col-sm-9"> <?php echo Html::activeDropDownList($model, 'function2', $jobFunctions, ['prompt' => Yii::t('job', '---')]); ?> <?php echo Html::activeDropDownList($model, 'function3', $jobFunctions, ['prompt' => Yii::t('job', '---')]); ?> </div> </div> <?php echo $form->field($model, 'work_type')->dropDownList(\app\modules\job\models\JobWorkType::getOptions(), ['prompt' => Yii::t('job', '---')]); ?> <?php $industry = \app\modules\job\models\JobIndustry::getOptions(); echo $form->field($model, 'industry')->dropDownList($industry, ['prompt' => Yii::t('job', '--- Select at least one ---')]); ?> <div class="form-group"> <label class="control-label col-sm-3"></label> <div class="col-sm-9"> <?php echo Html::activeDropDownList($model, 'industry2', $industry, ['prompt' => Yii::t('job', '---')]); ?> </div> </div>
/** * Finds the JobWorkType model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $_id * @return JobWorkType the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = JobWorkType::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }