D
D
dkrylov2017-04-13 22:27:08
Yii
dkrylov, 2017-04-13 22:27:08

How to customize a shape when rendering in a view?

Hello dear programmers!
In continuation, already a series of questions on yii2, I want to ask how to customize the form when rendering in the form. Those. using gii I have generated CRUD. And in the form of update.php I see this thing:

<?= $this->render('_form', [
        'model' => $model,
]) ?>

How to customize the form created in this form? Set CSS classes, and other options. If possible, then in an example, because I didn’t google Google =(
Please give an example.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Derepko, 2017-04-13
@dkrylov

The render method in the controller is used to display the file. To somehow modify the form or something else, you need to edit in the file itself (for example, _form). For example shape ( example ) or inputs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question