Answer the question
In order to leave comments, you need to log in
Yii2 How to add Editable to GridView?
Yii reports that:
Object of class kartik\editable\Editable could not be converted to string
The element of the columns array where I include the file to edit
[
// Комментарий о клиенте
'header' => Yii::t('views/langAdvancing', 'Comment'),
'format' => 'raw',
'value' => function ($mod) {
$comments = $mod->fkDClient->getCRecalls();
$model = new \common\models\ClientRecall();
return Yii::$app->controller->renderPartial('_editComment', [
'comment' => $comments['cr_comment'],
'model' => $model,
]);
}
],
use kartik\editable\Editable;
use yii\helpers\Html;
echo Editable::begin([
'model'=>$model,
'attribute' => 'cr_mark',
'size' => 'md',
'format' => 'button',
'editableValueOptions'=>['class'=>'well well-sm']
]);
Answer the question
In order to leave comments, you need to log in
If Editable::begin needs another editable::end then whatever is inside will be passed to the widget.
And if you need to call the widget:
echo Editable::widget()... , then you will get exactly the output of the widget.
//this is the first error i noticed
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question