I believe there is a documented issue that when you attempt to start a form name with a '0' it is not treated correctly (rather as null).
That being said it is always a good idea to name your fields as ModelName.fieldName and ModelName.{$index}.fieldName This is especially true when using saveAll(), and I do specify that in the tutorials. p.s. Under most "normal" circumstance your fields should never be named as {$index}.ModelName.fieldName On Sep 25, 12:10 pm, Günther Theilen <[EMAIL PROTECTED]> wrote: > Yep, I read those tutorials too, and it looks like it should work. > > A bit strange... > > grigri schrieb: > > > Sorry, I misinterpreted the setting. > > > I was using this on a hasMany edit page,so it's not exactly the same > > structure. > > > (Page hasMany Section, this was for editing the Sections). > > > I just tried on a direct multi-model edit page, and ran into problems > > just like you said. > > > However, in these tutorials: > > >http://teknoid.wordpress.com/2008/08/01/practical-use-of-saveall-part... > >http://teknoid.wordpress.com/2008/08/04/practical-use-of-saveall-part... > > > It looks like it *should* work. So I don't know... > > > On Sep 25, 4:28 pm, Günther Theilen <[EMAIL PROTECTED]> wrote: > >> Could you please post your controller code to populate the form? > > >> grigri schrieb: > > >>> I've never seen it done that way before. I always do it like this: > >>> (simplified view) > >>> $n = empty($this->data['Contact']) ? 0 : count($this- > >>>> data['Contact']); > >>> for ($i = 0; $i<$n; $i++) { > >>> echo $form->input("Contact.$i.name"); > >>> } > >>> This way the data is like this: > >>> $data = array( > >>> 'Contact' => array( > >>> 0 => array('id' => ..., 'name' => ...), > >>> 1 => array('id' => ..., 'name' => ...), > >>> 2 => array('id' => ..., 'name' => ...), > >>> ... > >>> ) > >>> ); > >>> ...works fine. > >>> hth > >>> grigri > >>> On Sep 25, 3:53 pm, Günther Theilen <[EMAIL PROTECTED]> wrote: > >>>> Donkeybob schrieb: > >>>>> what happens when you do it the other way . . . > >>>> That doesn't work at all. > >>>> I think I'll just capitulate an do it the old fashioned way: > >>>> index.ctp to list the records, edit.ctp to edit _one_ record > >>>> Thanks anyway! > >>>> Regards > >>>> Guenther > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---