Is there a way to insert the path of a file once it has been selected into a text input field?
Select images: <input type="file">
File path here: <input type="text">
I made a fiddle with an example: https://jsfiddle.net/5by18xon/
Is there a way to insert the path of a file once it has been selected into a text input field?
Select images: <input type="file">
File path here: <input type="text">
I made a fiddle with an example: https://jsfiddle.net/5by18xon/
Yes you can using change
event on input file :
$('input[type="file"]').change(function(){
$('input[type="text"]').val( $(this).val() );
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
Select images: <input type="file"><br><br>
File path here: <input type="text">