web/formwidgets.py
branchtls-sprint
changeset 1768 b59b7c422a8a
parent 1749 b61dc3e5dca5
child 1771 bb9538d91465
--- a/web/formwidgets.py	Tue May 12 20:53:45 2009 +0200
+++ b/web/formwidgets.py	Wed May 13 08:41:23 2009 +0200
@@ -71,6 +71,9 @@
         """
         self.add_media(form)
         name, values, attrs = self._render_attrs(form, field)
+        # ensure something is rendered
+        if not values:
+            values = (INTERNAL_FIELD_VALUE,)
         inputs = [tags.input(name=name, value=value, type=self.type, **attrs)
                   for value in values]
         return u'\n'.join(inputs)