beginForm(isset($model) ? "/admin/post/edit/" . $model->id : "/admin/post"); $form->field(class: \itguild\forms\inputs\TextArea::class, name: "post", params: [ 'class' => "form-control", 'placeholder' => 'Пост', 'rows' => '10', 'value' => $model->post ?? '' ]) ->setLabel("Пост") ->render(); $form->field(class: \itguild\forms\inputs\TextInput::class, name: "username", params: [ 'class' => "form-control", 'placeholder' => 'Логин', 'value' => $model->username ?? '' ]) ->setLabel("Имя пользователя") ->render(); ?>
field(\itguild\forms\inputs\Button::class, name: "btn-submit", params: [ 'class' => "btn btn-primary ", 'value' => 'Отправить', 'typeInput' => 'submit' ]) ->render(); ?>
field(\itguild\forms\inputs\Button::class, name: "btn-reset", params: [ 'class' => "btn btn-warning", 'value' => 'Сбросить', 'typeInput' => 'reset' ]) ->render(); ?>
endForm();