Jump to content

Clearing <input type="file" />


soycharliente

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

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.