From adbcddee8019d5c799eeeef6ee524f95bbe8f540 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 21 Mar 2016 23:12:07 +1300 Subject: [PATCH] Only iterate through dataFields() in FormSchema Temporary measure until we implement nested fields --- forms/FormSchema.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/forms/FormSchema.php b/forms/FormSchema.php index 9f2c00dcf..06c91f207 100644 --- a/forms/FormSchema.php +++ b/forms/FormSchema.php @@ -41,10 +41,9 @@ class FormSchema { $schema['actions'][] = $action->getSchemaData(); } - foreach ($form->Fields() as $fieldList) { - foreach ($fieldList->getForm()->fields()->dataFields() as $field) { - $schema['fields'][] = $field->getSchemaData(); - } + // TODO Implemented nested fields and use Fields() instead + foreach ($form->Fields()->dataFields() as $field) { + $schema['fields'][] = $field->getSchemaData(); } return $schema;