realconect
New Member
I'm using a form which contains wrapped elements. The wrapping happens in the view like described here.My action looks like this:\[code\] $myForm = [definition here] $myForm->setName('entity'); $myForm->setWrapElements(true); $request = $this->getRequest(); if ($request->isPost()) { $myEntity = new Entity(); $myForm->bind($myEntity); $myForm->setData($request->getPost()->get('entity'));\[/code\]The problem: When calling \[code\]$myForm->isValid()\[/code\] it's invalid. When calling \[code\]$myForm->getData()\[/code\] afterwards it's empty.I repeated the \[code\]setName\[/code\] and \[code\]setWrapElements\[/code\] in the action but with or without it, it doesn't work.Any ideas what I might be doing wrong? The form definition is untouched and works for non-wrapped forms. So I guess the error is not in there.