web/views/forms.py
changeset 2293 7ded2a1416e4
parent 2144 51c84d585456
parent 2270 70c0da0f2181
child 2573 9c414dbc76da
--- a/web/views/forms.py	Thu Jul 02 10:36:25 2009 +0200
+++ b/web/views/forms.py	Mon Jul 06 19:55:18 2009 +0200
@@ -119,8 +119,8 @@
 
     def form_add_hidden(self, name, value=None, **kwargs):
         """add an hidden field to the form"""
-        field = StringField(name=name, widget=fwdgs.HiddenInput, initial=value,
-                            **kwargs)
+        kwargs.setdefault('widget', fwdgs.HiddenInput)
+        field = StringField(name=name, initial=value, **kwargs)
         if 'id' in kwargs:
             # by default, hidden input don't set id attribute. If one is
             # explicitly specified, ensure it will be set