Skip to content

Commit

Permalink
BUGFIX: Fetch inputs inside of fieldsets
Browse files Browse the repository at this point in the history
* As fields can be nested inside of fieldsets and we didn't respect this
  depth

Resolves: #3
  • Loading branch information
Daniel Siepmann committed Aug 4, 2016
1 parent 3f88484 commit 0de84a6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Classes/Service/Form/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
}
}
}

Expand Down

0 comments on commit 0de84a6

Please sign in to comment.