diff --git a/deform/field.py b/deform/field.py index 40fb0341..3fce6062 100644 --- a/deform/field.py +++ b/deform/field.py @@ -278,12 +278,15 @@ def clone(self): attribute of the node is not cloned; instead the field receives a new order attribute; it will be a number larger than the last rendered field of this set. The parent of the cloned - node will become ``None`` unconditionally.""" + node will be retained by the clone.""" cloned = self.__class__(self.schema) cloned.__dict__.update(self.__dict__) cloned.order = next(cloned.counter) cloned.oid = 'deformField%s' % cloned.order - cloned._parent = None + parent = self.parent + if parent is not None: + parent = weakref.ref(parent) + cloned._parent = parent children = [] for field in self.children: cloned_child = field.clone() diff --git a/deform/templates/form.pt b/deform/templates/form.pt index bbdc75c9..5b8033b3 100644 --- a/deform/templates/form.pt +++ b/deform/templates/form.pt @@ -11,7 +11,9 @@ ajax_options ajax_options|field.ajax_options; formid formid|field.formid; action action|field.action or None; - method method|field.method;" + method method|field.method; + column_classes column_classes|field.widget.column_classes;" + tal:attributes="autocomplete autocomplete; style style; class css_class; @@ -43,11 +45,19 @@

+ tal:replace="structure child.render_template(item_template, form_class=css_class, column_classes=column_classes)"/> -
- - - + + ${button.title} + + +
-