richrock Posted July 2, 2010 Share Posted July 2, 2010 Maybe I don't ask questions right: <input type="file" /> - can I do the following: Set a value="filename"? Stop the input from stripping location data - eg : C:/Documents and Settings/<user>/Pictures/image.jpg becomes image.jpg. I may need to reinsert this value using php and it's stripping the complete file url. Assign a separate class for the browse button - actually are there any settings for it at all? Sorry if these sound dull/noob, but googling for me returns stuff about ASP, Java and I just want plain html answers so I can import my php to it. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted July 2, 2010 Share Posted July 2, 2010 Set a value="filename"? No. The field is read only. You cannot set it with HTML or javscript. Only the browser's file dialog box can set it. Stop the input from stripping location data - No. Only the file name portion is submitted and since there is no way for you to set the value, it does not matter. Assign a separate class for the browse button AFAIK - the only way to style the file browse button is to make it invisible and overlay it with your own button that you can style. Quote Link to comment Share on other sites More sharing options...
richrock Posted July 2, 2010 Author Share Posted July 2, 2010 Thanks. That confirms a few fears I had. Guess I'll have to look for a different system as I may need people to return to a form which has files marked for upload. Cheers. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted July 2, 2010 Share Posted July 2, 2010 Since resubmitting a form that contains filled-in file fields causes those files to be re-uploaded each time the form is submitted, you might want to separate the process into more than one form or process and save any uploaded files and not enable the file fields in the form if you need to have the visitor correct some of the other fields. Quote Link to comment Share on other sites More sharing options...
richrock Posted July 2, 2010 Author Share Posted July 2, 2010 Exactly what I was thinking - I have two forms, one which uploads a couple of images (album art) and then the next one uploads the mp3's (music site). They can then go back and upload alternative art (I guess) but it's mainly if there is a typo in the title/desciption, etc Cheers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.