So you have your view

views/fields/add.ctp

<?php echo $form->create('Field')?>
<?php echo $form->create('Field')?>




-----Original Message-----
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of Travis
Sent: Saturday, 4 July 2009 3:34 a.m.
To: CakePHP
Subject: Forms with multiple tables


I am new to cakePHP and am in the process of learning to use it.

I am wondering how I can have a form element populated with elements
from a different table than the model, for example

I am wanting to write a farm manager using cakePHP as the framework,
if I have fields that belong to farms, when you create a new field I
want to be able to select from a list of farms, and have it link
(insert farm's id as a foreign key), I have currently setup my
belongsto relationship so I can view but I cannot add.

my original thought was to create a $options array and just loop
through the table, but I cannot do that if I do not have access to the
farms table.

Help!



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4214 (20090703) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4215 (20090704) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 


--~--~---------~--~----~------------~-------~--~----~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to