My situation is like so..(I'm new to cake/MVC frameworks, but I have a
decent grasp of the concepts and have done a lot of reading)
I have User and Game models... their respective tables and a
games_users join table.
Users HABTM Games and vice versa.
In one form action, I want to create a new Game (with all default
fields), and grab the input from 2 select(dropdown) menus which will
contain two Users that should be associated with the game, so they get
their own rows in the join table.
I'm confused because I need to make 2 associations, and they are based
upon being connected to a game.id that is automatically generated
(auto increment).
I've started off with... (cake 1.2 by the way):
<?php echo $form->create('Game'); ?>
User A: <?php echo $form->select(????,$userlist)?>
User B: <?php echo $form->select(????,$userlist)?>
<?php echo $form->end('Add game'); ?>
$userlist is passed from the controller and populates the select boxes
with an array like someuserID=>someusername,
someotherID=>someotheruser etc.
I appreciate any help.
thanks,
Christian
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---