How to reset a container field to a blank?

A place for users and developers of the Xataface to discuss and receive support.

Postby sgallagher » Thu Aug 23, 2007 4:50 pm

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!
sgallagher
 
Posts: 2
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Thu Aug 23, 2007 5:20 pm

Sorry. No support yet for resetting container or blob fields. Perhaps in the next version.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby sgallagher » Fri Aug 24, 2007 3:03 am

Ok, thanks :)
sgallagher
 
Posts: 2
Joined: Wed Dec 31, 1969 5:00 pm

Postby dbaron2 » Wed Oct 07, 2009 11:05 pm

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.
dbaron2
 
Posts: 15
Joined: Wed Sep 30, 2009 10:27 pm

Postby shannah » Thu Oct 08, 2009 7:14 am

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).
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby dbaron2 » Thu Oct 08, 2009 8:06 pm

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.
dbaron2
 
Posts: 15
Joined: Wed Sep 30, 2009 10:27 pm

Postby shannah » Fri Oct 09, 2009 7:30 am

Oh.. i see. Best suggestion is to have them save the record. Then clear out the upload.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 11 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved