<?php echo $form->field($model, 'first_name')->textInput(); ?> <?php echo $form->field($model, 'last_name')->textInput(); ?> <?php echo $form->field($model, 'username')->textInput(); ?> <?php echo $form->field($model, 'email')->textInput(); ?> <?php echo $form->field($model, 'role')->widget(Select2::classname(), ['data' => User::getRolesList(), 'language' => 'en', 'options' => ['placeholder' => 'Select a role ...'], 'pluginOptions' => ['allowClear' => true]]); ?> <?php echo $form->field($model, 'password')->passwordInput(); ?> <div class="row"> <div class="col-xs-8"> <?php echo $form->field($model, 'photoFile')->fileInput(); ?> </div> <div class="col-xs-4"> <?php echo ThumbHelper::getImg($model->avatar, 100, 100, ['class' => 'pull-right']);