Hello!
I’m trying to setup a kartik’s Editable Grid column with Editable::INPUT_FILEINPUT widget. For some reason the file upload doesn’t happen.
In the controller action I put the following code
$tmp = UploadedFile::getInstance($model, 'logo');
if (empty($tmp)) {
$tmp = UploadedFile::getInstanceByName('logo');
}
but $tmp remains empty in any way…
My Editable column config:
'editableOptions' => function ($model, $key, $index) {
return [
'formOptions' => [
'action' => ['team/update'],
'options' => [
'enctype' => 'multipart/form-data'
],
],
'preHeader' => '',
'submitButton' => [
'icon' => Icon::show('download',['class' => 'text-primary'], Icon::FA)
],
'resetButton' => [
'icon' => Icon::show('ban',['class' => 'text-danger'], Icon::FA)
],
'inputType' => Editable::INPUT_FILEINPUT,
'options' => [
'options' => ['accept' => 'image/*'],
'pluginOptions' => [
'showRemove' => false,
'showUpload' => false,
]
],
];
},
Is there any specific that needs to be configured in addition?