web/formfields.py
changeset 2726 03e7a6efd960
parent 2680 66472d85d548
parent 2724 7966d87202d7
child 3246 9e4adca73a95
--- a/web/formfields.py	Fri Aug 07 10:43:34 2009 +0200
+++ b/web/formfields.py	Fri Aug 07 12:12:50 2009 +0200
@@ -257,7 +257,7 @@
         try:
             return req.data[self]
         except KeyError:
-            fkwargs = {}
+            fkwargs = {'eidparam': self.eidparam}
             if self.use_fckeditor(form):
                 # if fckeditor is used and format field isn't explicitly
                 # deactivated, we want an hidden field for the format
@@ -292,7 +292,8 @@
         format_field = self.get_format_field(form)
         if format_field:
             # XXX we want both fields to remain vertically aligned
-            format_field.widget.attrs['style'] = 'display: block'
+            if format_field.is_visible():
+                format_field.widget.attrs['style'] = 'display: block'
             result = format_field.render(form, renderer)
         else:
             result = u''