web/views/formrenderers.py
changeset 4156 1bbb0ee42c8e
parent 4083 3b285889b8e9
child 4164 119a374c5eb4
--- a/web/views/formrenderers.py	Mon Dec 21 18:46:46 2009 +0100
+++ b/web/views/formrenderers.py	Mon Dec 21 19:18:49 2009 +0100
@@ -97,7 +97,7 @@
             label = self._cw.pgettext(*field.label)
         else:
             label = self._cw._(field.label)
-        attrs = {'for': form.context[field]['id']}
+        attrs = {'for': field.dom_id(form)}
         if field.required:
             attrs['class'] = 'required'
         return tags.label(label, **attrs)