Link to home
Start Free TrialLog in
Avatar of jastroem
jastroem

asked on

set a value to a <input type="file"> field

Is there a way to set a value (in this case descriptive text) to a form field <input type="file">?

/joergen

ASKER CERTIFIED SOLUTION
Avatar of dorward
dorward

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
please clarify...

do you want some descriptive text or do you want a certain file to be already in the field when the page is loaded.

the second case is not possible.

for the first, there are many workarounds...what dorward told you is one, you can also have a tooltip or a stutusbar message <-- BAD!

This is being asked umpteen times. There's no way to put text in a input type=file

hongjun
Avatar of jastroem
jastroem

ASKER

Thanks a lot for the information.

I understand the teh security issue - unfortunately there are some cases where it could be really goog to place a previous uploaded file in the file field... like in this case where a record is updated.

I have solved the problem in another - less nice - way.

/ joergen