--- a/web/formwidgets.py Mon May 11 18:02:04 2009 +0200
+++ b/web/formwidgets.py Mon May 11 19:44:52 2009 +0200
@@ -9,7 +9,7 @@
from datetime import date
from cubicweb.common import tags
-from cubicweb.web import INTERNAL_FIELD_VALUE, stdmsgs
+from cubicweb.web import stdmsgs, INTERNAL_FIELD_VALUE
class FieldWidget(object):
@@ -50,6 +50,8 @@
"""
name = form.context[field]['name']
values = form.context[field]['value']
+ if not values:
+ values = (INTERNAL_FIELD_VALUE,)
if not isinstance(values, (tuple, list)):
values = (values,)
attrs = dict(self.attrs)