/** * Finds the FieldsTypes model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return FieldsTypes the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = FieldsTypes::find()->where(['id' => $id])->multilingual()->one()) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
?> <?php echo $form->field($model, 'order')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'category_id')->hiddenInput(['value' => $category_id])->label(false); ?> <?php echo $form->field($model, 'id')->hiddenInput(['value' => $model->id])->label(false); ?> <?php echo $form->field($model, 'type_id')->dropDownList(ArrayHelper::map(FieldsTypes::find()->all(), 'id', 'title'), ['prompt' => 'Select Option Type']); ?> <?php echo $form->field($model, 'is_required')->checkbox(['label' => Yii::t('backend', 'Required')]); ?> <?php echo $form->field($model, 'has_other')->checkbox(); ?> <?php echo $form->field($model, 'is_active')->checkbox(['label' => Yii::t('backend', 'Active')]); ?>