You probably need an ajax call to update the 2 boxes when the value of
your first box changes.
See a sample here :
http://www.devmoz.com/blog/2007/04/04/cakephp-update-a-select-box-using-ajax/
On Nov 15, 10:29 pm, ldb <[EMAIL PROTECTED]> wrote:
> G'day
>
> I just can't seem to find the right answer to this one. Hopefully
> someone can point me in the right direction please. I have the
> following function in a "app/controllers/models_controller.php". I
> load three select boxes two of which rely on data from the first one.
> I can enter a manual value into the array as you can see, and they
> display the data fine, but I can't seem to figure out how to capture
> the value of the current selected item from the first generateList to
> feed it to the two others.
>
> Can someone please enlighten me?.........;-)
>
> function index() {
> $this->set('models', $this->Modelinfo->Model->generateList(null,
> 'Model_Number', null,
>
> '{n}.Model.Model_Number','{n}.Model.Model_Number', true, true ) );
>
> $this->set('modelinfos',
> $this->Modelinfo->generateList(array('Modelinfo.Model_Number'=>
> 'LD400'),null, null,
>
> '{n}.Modelinfo.Model_Number','{n}.Modelinfo.AltModel_Number'));
>
> $this->set('altmodels',
> $this->Altmodel->generateList(array('Altmodel.Model_Number'=> 'LD400'),null,
> null,
>
> '{n}.Altmodel.Model_Number','{n}.Altmodel.Alt_Model'));
>
> }
>
> Thanks....
> --
> ldb
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---