zope.schema - overriding field with no value

Jonathan Bowlas <j.bowlas-hclig2XLE9Zaa/[email protected]> Tue, 14 Jun 2011 17:10:14 +0100
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
When creating a silva extension how would I go about overriding a non
required field with no value.

For example I have a TextLine field:

    analytics_tracker_code = schema.TextLine(
        title=u"Google Analytics Tracker Code",
        description=u"Google Analytics Tracker Code ID (e.g 'UA-XXXXXX-X').",
        required=False)

However if I add a value to this field using the edit form of my
extension and then later decide I want to remove the value by deleting
it via the form. The existing entry is retained as there is nothing to
overwrite it.

What can I do to get the field back to None? I tried setting
default=None, but that doesn't work.

Cheers

Jon

-- 
Jonathan Bowlas
Web Support Officer
Media Services
University College London
Email: j.bowlas-hclig2XLE9Zaa/[email protected]