symfony 1.4 embedForm not returning all embedded forms

Posted by Patrick on Stack Overflow See other posts from Stack Overflow or by Patrick
Published on 2012-03-27T17:26:13Z Indexed on 2012/03/27 17:29 UTC
Read the original article Hit count: 175

Filed under:

I have a form with multiple embedded forms and symfony is not binding all the embedded forms.

The layout is a m-to-m layout:

activity:
  id:

link:
  id:
  activity_id: FOREIGN KEY to activity table
  other_data_id: FOREIGN KEY to other_data table

other_data:
  id:

For instance I have 7 identical embedded forms iterated at the end of each name (ie- form_1, form_2, ..., form_7).

With the new and edit forms all the 7 fields display properly, but when I submit the form, the embedded forms after a certain number just aren't in the embedded forms array of the sfForm.

I have two different embedded forms, the first form stops binding at 5 and the second form stops binding at 4.

I've looked at the array of posted values through $request->getPostParameters(); and all the fields are there.

If I manually enter the data into the database, the binding works without a problem.

Any ideas would be greatly appreciated!

© Stack Overflow or respective owner

Related posts about binding