Jump to content

Clearing <input type="file" />


Recommended Posts

I have a form, which will be emailed to someone, that will allow the user to attach an image. Let's say the user picks and image and then decides that they don't want to attach an image at all. I'm having trouble clearing what's in the <input type="file" /> box. When I click on the text to simply hit delete/backspace, it reopen the 'choose file' dialog box.

 

How can I clear this one input field? I would prefer to NOT use Javascript or reload the form.

 

I am using:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.8) Gecko/2009032608 Firefox/3.0.8

PHP Version 4.4.7

Link to comment
https://forums.phpfreaks.com/topic/157834-clearing/
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.