author | sylvain.thenault@logilab.fr |
Fri, 10 Apr 2009 16:48:48 +0200 | |
branch | tls-sprint |
changeset 1338 | 9e038f84dbb3 |
parent 1337 | 828bbf500bcc |
child 1339 | f74674c042ed |
web/form.py | file | annotate | diff | comparison | revisions |
--- a/web/form.py Fri Apr 10 16:48:28 2009 +0200 +++ b/web/form.py Fri Apr 10 16:48:48 2009 +0200 @@ -302,6 +302,10 @@ def form_add_hidden(self, name, value=None, **kwargs): field = StringField(name=name, widget=fwdgs.HiddenInput, 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 + field.widget.setdomid = True self.fields.append(field) return field