hardyvoje Posted July 23, 2006 Share Posted July 23, 2006 Hello,Another thing that i have to ask,I''m developing automatic tutorial submission tool using PHP (of course :) )(project is stable beta: http://www.omnetwork.net/ta )I have passed field info with $_POST and $_SESSION and then integrated it to HTML of next form (goal is to enable users to enter info about Tutorial at one page and then just to click - next, next, next and to submit it to 20+ tut indexes....)like this:[code]<input id="siteurl" name="siteurl" type="text" size="50" maxlength="50" value="<?php echo $row['url']; ?>" />[/code]But is there way to pass info to file form object?I've tried:[code]<input name="thumbnail" type="file" size="25" value=<? php echo $row['avatar']; ?> />?[/code]but nothing, File object left empty.Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/15391-providing-default-info-to-file-form-object-in-html/ Share on other sites More sharing options...
wildteen88 Posted July 23, 2006 Share Posted July 23, 2006 I think its not possible to provide a defualt value for a file input box. Quote Link to comment https://forums.phpfreaks.com/topic/15391-providing-default-info-to-file-form-object-in-html/#findComment-62382 Share on other sites More sharing options...
hardyvoje Posted July 23, 2006 Author Share Posted July 23, 2006 It seems to me same... thanks anywayBut if someone has some great idea :) how to solve this, you're welcome! Quote Link to comment https://forums.phpfreaks.com/topic/15391-providing-default-info-to-file-form-object-in-html/#findComment-62384 Share on other sites More sharing options...
kenrbnsn Posted July 23, 2006 Share Posted July 23, 2006 I think Javascript can set it, but I'm not sure.Ken Quote Link to comment https://forums.phpfreaks.com/topic/15391-providing-default-info-to-file-form-object-in-html/#findComment-62386 Share on other sites More sharing options...
wildteen88 Posted July 23, 2006 Share Posted July 23, 2006 From looking at the w3c html specs, it says you can use value, however it is down to the user agent (web browser).[quote=http://www.w3.org/TR/html4/interact/forms.html]Creates a file select control. User agents may use the value of the value attribute as the initial file name.[/quote]So it appears the people that create browsers opt to not use the value attribute for a file object. Quote Link to comment https://forums.phpfreaks.com/topic/15391-providing-default-info-to-file-form-object-in-html/#findComment-62387 Share on other sites More sharing options...
hardyvoje Posted July 23, 2006 Author Share Posted July 23, 2006 hmm... using JS seems good idea for meHas anyone snippet for such or similar thing? Quote Link to comment https://forums.phpfreaks.com/topic/15391-providing-default-info-to-file-form-object-in-html/#findComment-62424 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.