web/views/autoform.py
changeset 4295 b9590e68c543
parent 4277 35cd057339b2
child 4306 01e5efc0d823
--- a/web/views/autoform.py	Wed Jan 20 14:39:10 2010 +0100
+++ b/web/views/autoform.py	Wed Jan 20 14:39:44 2010 +0100
@@ -89,7 +89,9 @@
                 except form.FieldNotFound:
                     # meta attribute such as <attr>_format
                     continue
-        if self.formtype == 'main' and entity.has_eid():
+        if self.formtype == 'main' and entity.has_eid() and (
+            self.display_fields is None or
+            '_cw_generic_field' in self.display_fields):
             try:
                 self.fields.append(self.field_by_name('_cw_generic_field'))
             except form.FieldNotFound: