Display file name next to file upload field

nonsavant 17 Aug, 2012
This was going to be a question, until I answered it myself. In case it helps anyone else, I'll post anyway.

In the tutorial video on file uploads (here: http://www.youtube.com/watch?v=pdgxL_28t18), the file upload element consists of:
1. choose file button
2. file selected text (which updates to show the filename when a file has been chosen)

However my file upload element consists of a text field (containing the file path) and a browse button, which I don't find as nice. How is it possible to get the element as shown in the video?

ANSWER: I was using Firefox, guess Greyhead was using Chrome maybe? I checked in Chrome and it displays the 'choose file' button and 'file name'.

Chrome's method of just displaying the fileNAME is more elegant, I would say. With Firefox, you get the filePATH as well, such that usually you can't see the filename. Oh well.
GreyHead 17 Aug, 2012
Hi nonsavant,

You are right. The layout of the File Upload element depends on the browser that you use. I think that it is possible to over-rule this setting with a little JavaScript and CSS if you need to. There's an example here that I found via StackOverFlow.

Bob
This topic is locked and no more replies can be posted.