Jump to content

Providing default info to File form object in HTML?


hardyvoje

Recommended Posts

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!
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.