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!
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.