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-1-working-with-multiple-models/
> http://teknoid.wordpress.com/2008/08/04/practical-use-of-saveall-part-2-notes-and-tips/
> 
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to