This ought to work...

Get your data array sorted by model name, e.g.

['User']
        ['id']
        ['name']
['Product']
        [0]
                ['id']          
                ['name']
        [1]
                ['id']          
                ['name']
['Location']
        .etc

Then name your form fields appropriately:
echo $this->Form->input('User.id');
echo $this->Form->input('User.name');
echo $this->Form->input('Product.0.id');
echo $this->Form->input('Product.0.name');
echo $this->Form->input('Product.1.id');
echo $this->Form->input('Product.1.name');

.etc

Then when the form is submitted your data array should be in a good shape. Then 
save each model in turn:
$this->ThisModel->User->save($this->data['User']);
$this->ThisModel->User->saveAll($this->data['Product']);
etc.

Jeremy Burns
Class Outfit

[email protected]
http://www.classoutfit.com

On 16 Sep 2010, at 10:40, james wrote:

> whats the best way to approach a view that requires information
> (possibly unrelated) from many tables that can be edited and saved to
> all those tables?
> 
> thanks
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to [email protected]
> 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

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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