Entering a file using bootstrap

I would like to use bootable file input to view the file. I get 3 action buttons when I use this <input id="myName" type="file" name="myName" class="file" />

and has the following line when initializing

$("#myName").fileinput({ showUpload: false, showRemove: false })

But still I see the action buttons “Delete”, “Download” and “Browse” there. I would like to see only the "Overview". I do not want to modify the css file. Is there a way to do this in html or js?

+4
source share
3 answers

As per the documentation, try using quotation marks around the parameters.

For instance:

$("#myName").fileinput({'showUpload':false, 'showRemove':false});

+1
source

, ... showUpload showRemove. HTML 5 , - - javascript , .

. , <input id="myName" type="file" name="myName" class="file" />, class = file, , , JS .

, , , input type = file class = file.

, , javascript . class = file :

<input id="myName" type="file" name="myName"/>

( , ), .

$(document).on('ready', function() {
    $("#myName").fileinput({ showUpload: false, showRemove: false });
});
+1

One of the ways that worked for me was to set these settings to initialization.

<input id="myName" type="file" class="file" data-show-upload="false" data-show-remove="false"> 
0
source

All Articles