Im facing exactly the same problem right now. Im just curious about
the structure the array has to have to be able to use $this->Model1-
>save() inside the controller and save the HABTM record in the
jointable.

I have students and subjetcs. The association is many to many. I
cannot create a student and a subject at the same time I create a
subject, or viceversa. The process is to have both models filled with
records, and then, enroll a student in a subject. I dont know how to
setup the views (in the controller could be an 'enroll' action in the
students controller, or maybe in subjects controller) with the form to
submit the relation and save the HABTM record.

Thanks in advance.

On Aug 12, 11:41 am, teknoid <[EMAIL PROTECTED]> wrote:
> $this->Paysite->Niche->find('list'), since you need the Niche.id and
> Niche.name
>
> On Aug 12, 5:36 am, tekomp <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have a basicHABTMrelationship.  Join table is "niches_paysites".
> > I'm setting up CRUD for "paysites", but can't get the form helper to
> > populate the "select" input box with the names from the "niches"
> > table.   It's creating the select input box, but there are no
> > options.  It works fine when scaffolding though.
>
> > I've tried many things in the paysite view, including:
>
> > $form->input('Niche')
> > $form->input('Niche/Niche')
>
> > I also tried with a number of things in the paysite controller, but to
> > no avail:
>
> > $this->set('niches', $this->Paysite->NichesPaysite->find('list',
> > array('Niche.name')));
> > $this->set('niches', $this->NichesPaysites->find('list',
> > array('Niches.name')));
>
> > I'm not trying to create any new niches on the fly, I just want to
> > create associations withexistingniches.  Any ideas?
--~--~---------~--~----~------------~-------~--~----~
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