S
S
Sergey2015-04-26 00:59:53
Yii
Sergey, 2015-04-26 00:59:53

How to set text for textarea in yii2 using activeForm widget?

echo $form10->field($model10, 'overview')->textarea(['value' => '123'])->label('overview:');

It generates a textarray for me, and the value is correct in the value attribute, but there is no text inside the textarray. How can I make it so that the text inside it is the same?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
@
@codenix, 2015-04-26
@butteff

$model10->overview = '123';
echo $form10->field($model10, 'overview')->textarea();

A
Alastor, 2015-04-26
@Alastor

and if so?

echo $form10->field($model10, 'overview')->textarea()->label('overview:')->value('123');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question