[英]Yii2 Kartik fileinput Issue
I have create a file input field in yii2 using kartik fileinput widget.Just see the code below我已经使用 kartik 文件输入小部件在 yii2 中创建了一个文件输入字段。请看下面的代码
<?=FileInput::widget([
'name' => 'pictures[]',
'pluginOptions' => [
'showPreview' => false,
'showCaption' => false,
'showRemove' => false,
'showUpload' => false,
'browseClass' => 'btn btn-theme btn-lg btn-block',
'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ',
'browseLabel' => 'Select Photo'
],
'options' => [
'accept' => 'image/*',
'multiple' => true],
]);
How to hide the highlighted button.I mean cancel button如何隐藏突出显示的按钮。我的意思是取消按钮
You can hide the cancel button with the showCancel
, as you do with the other properties:您可以使用
showCancel
隐藏取消按钮,就像使用其他属性一样:
'pluginOptions' => [
'showPreview' => false,
'showCaption' => false,
'showRemove' => false,
'showCancel' => false, // <--- HERE
'showUpload' => false,
'browseClass' => 'btn btn-theme btn-lg btn-block',
'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ',
'browseLabel' => 'Select Photo'
],
You can check all the props and options in the javascript documentation (It is more complete than the Yii2 one).您可以查看 javascript 文档中的所有道具和选项(它比 Yii2 更完整)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.