28 Jan
2000
28 Jan
'00
5:28 a.m.
Someone recently posted asking how to trap empty form values in ZClass constructors. I stumbled across Zen's How-To "http://www.zope.org/Members/Zen/howto/FormVariableTypes" which contains the answer: "When the [name] form field is left blank, :ignore_empty skips over the variable rather than returning a null string as its value." Note, it seems that it's necessary to also indicate the field type, ie., use varname:string:ignore_empty rather than just varname:ignore_empty which will not work. Cheers, Darran.