Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

fixed form hydration for forms with wrapped elements #162

Closed
wants to merge 2 commits into from

Conversation

scroach
Copy link
Contributor

@scroach scroach commented May 3, 2017

After updating the dependencies on a project which hasn't been updated in a while I stumbled upon a problem with form hydration.

When using a form with setWrapElements(true); the method bindValues in FieldSet fails because it fetches the elements name with $name = $element->getName();
This fails cause the name might be something like myFormName[myFormElement] instead of myFormElement and it is not recognized.

Prior to commit 82b0cdc the method simply used foreach ($this->iterator as $name => $element) { which still works.

Please correct me if I'm wrong but I think the current behaviour is wrong.
I've reverted the line and provided an additional unit test.

@froschdesign froschdesign added this to the 2.10.2 milestone May 9, 2017
@froschdesign froschdesign modified the milestones: 2.10.2, 2.10.3 Oct 17, 2017
@weierophinney weierophinney modified the milestones: 2.10.3, 2.11.0 Dec 6, 2017
weierophinney added a commit that referenced this pull request Dec 6, 2017
weierophinney added a commit that referenced this pull request Dec 6, 2017
@weierophinney
Copy link
Member

Thanks, @scroach; merged to develop for release with 2.11.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants