Skip to content

Bug - Array field's Data on CollectionType not saved #407

@RehArk

Description

@RehArk

Hi everyone,

I think I have found a bug on data binding on CollectionType fields.

In $request, the current data are that :

"funds" => array:2 [▼
   "__name__" => array:2 [
      "label" => "services"
      "amount" => "10"
   ]
   "__name_0__" => array:2 [
      "label" => "tools"
      "amount" => "15"
   ]
]

But after binding it to my $formData, that is what the return is :

+funds: array:2 [▼
    "__name__" => []
    "__name_0__" => []
]

FormFlow properly detects my "subfield" but the data it contains is not saved

Here's what I did

$formData = new Entity();
$flow = $formFlow;
$flow->bind($formData);

dump($request);
dump($formData);

die();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions