From 0de84a6ab65f0d9da8db1c3e876575dd2c9d25fc Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 4 Aug 2016 17:37:12 +0200 Subject: [PATCH] BUGFIX: Fetch inputs inside of fieldsets * As fields can be nested inside of fieldsets and we didn't respect this depth Resolves: #3 --- Classes/Service/Form/Input.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Classes/Service/Form/Input.php b/Classes/Service/Form/Input.php index 11710e1..e75ba1c 100644 --- a/Classes/Service/Form/Input.php +++ b/Classes/Service/Form/Input.php @@ -34,10 +34,19 @@ class Input * @param ObjectStorage $inputs */ public function __construct(ObjectStorage $inputs) + { + $this->getInputOfField($inputs); + } + + protected function getInputOfField(ObjectStorage $inputs) { foreach ($inputs as $input) { - $inputInformation = $input->getAdditionalArguments(); - $this->rawFormInputs[$inputInformation['name']] = $inputInformation['value']; + if ($input->getElementType() === 'FIELDSET') { + $this->getInputOfField($input->getChildElements()); + } else { + $inputInformation = $input->getAdditionalArguments(); + $this->rawFormInputs[$inputInformation['name']] = $inputInformation['value']; + } } }