--- a/src/pyams_form/form.py Fri May 18 15:55:15 2018 +0200
+++ b/src/pyams_form/form.py Fri May 18 15:55:52 2018 +0200
@@ -160,10 +160,11 @@
if include_self:
yield self
for group in self.groups:
- for subform in group.subforms:
+ for subform in group.get_forms():
yield subform
for form in self.subforms:
- yield form
+ for subform in form.get_forms():
+ yield subform
for form in self.tabforms:
yield form
@@ -320,6 +321,8 @@
"""Extract AJAX POST output"""
output = {}
for form in self.get_forms(include_self=False):
+ if form.mode == DISPLAY_MODE:
+ continue
try:
form_output = form.get_ajax_output(changes)
if form_output:
--- a/src/pyams_form/group.py Fri May 18 15:55:15 2018 +0200
+++ b/src/pyams_form/group.py Fri May 18 15:55:52 2018 +0200
@@ -134,6 +134,11 @@
IInnerSubForm)),
key=get_form_weight)
+ def get_forms(self):
+ for form in self.subforms:
+ for subform in form.get_forms():
+ yield subform
+
def update(self):
[subform.update() for subform in self.subforms]