[silva-dev] zope.schema - overriding field with no value

Jonathan Bowlas j.bowlas at ucl.ac.uk
Tue Jun 14 18:10:14 CEST 2011


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 at ucl.ac.uk


More information about the silva-dev mailing list