I have a button "Choose file" as follows (I am using Jade but it should be the same as Html5):
input(type='file', name='videoFile')
In the browser this shows a button with a text next to it "No file chosen". I would like to change the "No file chosen" text to something else, like "No video chosen" or "Choose a video please". I followed the first suggestions here:
I don't want to see 'no file chosen' for a file input field
But doing this did not change the text:
input(type='file', name='videoFile', title = "Choose a video please")
Can anybody help me figure out where the problem is?
Try this its just a trick
How it works
It's very simple. the Label element uses the "for" tag to reference to a form's element by id. In this case, we used "img" as the reference key between them. Once it is done, whenever you click on the label, it automatically trigger the form's element click event which is the file element click event in our case. We then make the file element invisible by using display:none and not visibility:hidden so that it doesn't create empty space.
Enjoy coding
But if you try to remove this tooltip
This wont work. Here is my little trick to work this, try title with a space. It will work.:)
I would use "button" instead of "label", hope this help someone.
This will just display a button, user clicked will popup file chooser, after file chose, automatically upload.
HTML
CSS
Note: Btn btn-primary is a class of bootstrap button. However the button may look weired in position. Hope you can fix it by inline css.
and the css