beginForm(isset($model) ? "/admin/post/edit/" . $model->id : "/admin/post"); $form->field(class: \itguild\forms\inputs\TextArea::class, name: "content", params: [ 'class' => "form-control", 'placeholder' => 'Контент', 'rows' => '10', 'value' => $model->content ?? '' ]) ->setLabel("Пост") ->render(); $form->field(class: \itguild\forms\inputs\Select::class, name: "user_id", params: [ 'class' => "form-control", 'value' => $model->user_id ?? '' ]) ->setLabel("Пользователи") ->setOptions(\app\services\UserService::createUsernameArr()) ->render(); ?>