The correct binding is:

  $this->form->bind(array(
     'journal[batch_id]' => $request->getParameter('journal[batch_id]'),
     'journal[journaltype_id]' =>
$request->getParameter('journal[journaltype_id]'),
     'journal[journalsubtype_id]' => $request-
>getParameter('journal[journalsubtype_id]'),
     'journal[comment]' => $request->getParameter('journal[comment]')
   ));


2008/6/4 IsRobot <[EMAIL PROTECTED]>:

>
> I have been unable to bind a form with its embedded form.
>
> 1) This works fine for the main form only:
>
>    $this->form->bind($request->getParameter('journal'));
>
> 2) This should bind the main form only but it does not work and no
> obvious errors are returned:
>
>    $this->form->bind(array(
>      'batch_id' => $request->getParameter('batch_id'),
>      'journaltype_id' => $request->getParameter('journaltype_id'),
>      'journalsubtype_id' => $request-
> >getParameter('journalsubtype_id'),
>      'comment' => $request->getParameter('comment')
>    ));
>
> 3) This should bind the main form and the embedded form but it causes
> the form validation to fail:
>
>    $this->form->bind(array(
>      'batch_id' => $request->getParameter('batch_id'),
>      'journaltype_id' => $request->getParameter('journaltype_id'),
>      'journalsubtype_id' => $request-
> >getParameter('journalsubtype_id'),
>      'comment' => $request->getParameter('comment'),
>      'posting[journal_id]' => $request-
> >getParameter('posting[journal_id]'),
>      'posting[account_id]' => $request-
> >getParameter('posting[account_id]'),
>      'posting[assettype_id]' => $request-
> >getParameter('posting[assettype_id]'),
>      'posting[amount]' => $request->getParameter('posting[amount]')
>    ));
>
> 4) This also causes the form validation to fail:
>
>    $this->form->bind(array(
>      $request->getParameter('journal'),
>      $request->getParameter('posting')
>    ));
>
> I don't know how to proceed. Any ideas?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to