在更新表单时如何在ActiveForm yii2中显示textarea值? [关闭]

While updating a form having textarea as input box, I am unable to show the value in textarea. Can anybody help me to find out the problem?

$form->field($model, 'registered_address_line1')->textarea(['rows' => 2, $seller->registered_address_line1])

Thanks

If you want to set the value in the textarea, you need to set the value of that property in the model. In your case:

$model->registered_address_line1 = $seller->registered_address_line1;
$form->field($model, 'registered_address_line1')->textarea(['rows' => 2]);