Page 1 of 1

PostPosted: Thu Aug 23, 2007 4:50 pm
by sgallagher
Hi,
I have some container fields on my site that are working well (as references to files placed on the system), except, for example if I upload a file and then want to blank the entry at a later date, how do I give the user the option to blank the container field? If they leave the "Browse" entry blank, it doesn't affect the data.

My fields.ini looks a bit like this..

[podcast_filename]
Type = container
widget:type = file
widget:label = "Podcast"
url = /podcasts
allowed_extensions = mp3
max_size = 20480

Thanks!

PostPosted: Thu Aug 23, 2007 5:20 pm
by shannah
Sorry. No support yet for resetting container or blob fields. Perhaps in the next version.

-Steve

PostPosted: Fri Aug 24, 2007 3:03 am
by sgallagher
Ok, thanks :)

PostPosted: Wed Oct 07, 2009 11:05 pm
by dbaron2
Has there been an update on this issue?

I just ran into the same problem.

It appears that the problem exists only for Firefox and Chrome. IE, K-Meleon, SeaMonkey and Opera allow you to edit and clear the field with the file name.

PostPosted: Thu Oct 08, 2009 7:14 am
by shannah
This was added a couple releases ago. On the edit form, there is now a red 'X' next to any container field. Clicking on this will delete the current file (i.e. blank the container field).

PostPosted: Thu Oct 08, 2009 8:06 pm
by dbaron2
Yes and that works well for after the record is saved. But what if the user has not saved the record yet? The user cannot get to the field to space it out since when the user clicks on the field the open file dialog box is displayed. It is interesting that both Firefox and Chrome behave this way. IE, Opera, K-Meleon and SeaMonkey let the user edit the field. Perhaps I need to look for a Firefox setting that would control this.

PostPosted: Fri Oct 09, 2009 7:30 am
by shannah
Oh.. i see. Best suggestion is to have them save the record. Then clear out the upload.