web/formwidgets.py
changeset 1989 8c8dead642f7
parent 1977 606923dff11b
child 2091 a7ea618e5478
--- a/web/formwidgets.py	Thu May 28 18:45:51 2009 +0200
+++ b/web/formwidgets.py	Thu May 28 18:46:04 2009 +0200
@@ -177,8 +177,8 @@
 
     def render(self, form, field):
         name, curvalues, attrs = self._render_attrs(form, field)
-        if not 'size' in attrs and self._multiple:
-            attrs['size'] = '5'
+        if not 'size' in attrs:
+            attrs['size'] = self._multiple and '5' or '1'
         options = []
         optgroup_opened = False
         for label, value in field.vocabulary(form):