use kartik\select2\Select2; use kartik\file\FileInput; /* @var $this yii\web\View */ /* @var $student common\models\Student */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="student-form"> <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?> <?php echo $form->field($student, 'user_id')->dropDownList(common\models\User::getMappedArray()); ?> <?php echo $form->field($student, 'name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($student, 'lastname')->textInput(['maxlength' => true]); ?> <?php echo $form->field($student, 'email')->textInput(['maxlength' => true]); ?> <?php