--- a/web/formfields.py Wed Jul 29 09:07:12 2009 +0200
+++ b/web/formfields.py Wed Jul 29 09:08:04 2009 +0200
@@ -478,6 +478,9 @@
super(CompoundField, self).__init__(*args, **kwargs)
self.fields = fields
+ def subfields(self, form):
+ return self.fields
+
def actual_fields(self, form):
return [self] + list(self.fields)
--- a/web/formwidgets.py Wed Jul 29 09:07:12 2009 +0200
+++ b/web/formwidgets.py Wed Jul 29 09:08:04 2009 +0200
@@ -291,9 +291,9 @@
subst = self.attrs.get('label_input_substitution', '%(label)s %(input)s')
fields = [subst % {'label': renderer.render_label(form, f),
'input': f.render(form, renderer)}
- for f in field.fields]
+ for f in field.subfields(form)]
else:
- fields = [f.render(form, renderer) for f in field.fields]
+ fields = [f.render(form, renderer) for f in field.subfields(form)]
return u'<div>%s</div>' % ' '.join(fields)