I am trying to store the filename of the selected file to be uploaded into a hidden input field on the form. my form looks like this
The filename does not become available until the file is uploaded. This happens after the form is posted. The only way around this is to try posting the fileupload via AJAX and then returning the filename.
Otherwise, you can assign the value to the field after the file is upload and the form is posted.