pass the id in the url
/registrations/add/CAMPERID
and set it inside the controller
function add($id) {
if (!empty($this->data)) {
POST PART
} else {
// here goes your id
$this->data['Registration']['camper_id'] = $id;
}
...
}
On 16 Jul., 17:11, Hiken <[email protected]> wrote:
> I'm new to cake, so bare with me a little bit. what i want to do is
> this:
> i have a field campers and a field registrations, with a relationship
> one to many. when i view a camper and press new registration, i want
> the view to have pre-selected the camper_id that i was viewing. how is
> that possible?
> thnx in advance
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php