You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Kartik, thank you for all your widgets and plugins. I just want some help with this, anything wrong why my 'showRemove'=>false and 'width'=>'120px' not working?
Hi Kartik, thank you for all your widgets and plugins. I just want some help with this, anything wrong why my 'showRemove'=>false and 'width'=>'120px' not working?
[
'attribute'=>'photo',
'value'=>'../photos/'.$model->photo,
'format' => ['image',['width'=>'100','height'=>'100']],
'type' => DetailView::INPUT_WIDGET,
'widgetOptions' => [
'class' => \kartik\file\FileInput::class,
'options' => [
'accept' => 'image/*',
'multiple'=>false,
],
'pluginOptions' => [
'initialPreview'=>[
!empty($model->photo) ? Yii::$app->params['backendUrl']. '/photos/' .$model->photo : null,
],
'initialCaption'=>!empty($model->photo) ? $model->photo : false,
'initialPreviewConfig' => [
[
'caption' => $model->photo,
'width' => '120px',
],
],
'allowedFileTypes' => ['image'], // allow only images
'initialPreviewAsData'=>true,
'showUpload' => false,
'showRemove' => true,
'showCancel' => false,
'browseLabel' => '',
'removeLabel' => '',
'mainClass' => 'input-group-sm',
'bytesToKB' => 1024,
'sizeUnits' => ['B', 'KB', 'MB'],
'maxFileSize'=>2000, //2mb
'fileActionSettings'=>[
'showZoom' => true,
'showRotate' => false,
'showRemove' => false,
]
]
]
],
The text was updated successfully, but these errors were encountered: