V
V
Vitaly Liber2015-04-14 08:26:07
Yii
Vitaly Liber, 2015-04-14 08:26:07

How to increase row height of Active Form in Yii2?

I use Yii2 and Active Form.
There is a field In it you need to write, for example, a small note. How to change its height?
<?= $form->field($model, 'post') ?>
507ee5e4204348f9ae3bf0eb78a6a32f.PNG

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alzasr, 2015-04-14
@VitalyLiber

As far as I understand, you are a beginner programmer. 3 question from the tape and 3 question that can be solved by reading the documentation. field - creates input type="text", it is single line, if you need multiline use textarea. field($model,'post')->textarea();

A
Alexander N++, 2015-04-14
@sanchezzzhak

You can set HTML attributes for an r element in the last function

<?= $form->field($model,'post')->textarea(['class' => 'my_post' , 'data-id' => '123']); ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question