Thank you so much i appreciate will try it, and if i av any problem will let u know, thank you
On Thu, May 24, 2012 at 6:44 AM, Justin Edwards <justinledwa...@gmail.com>wrote: > This is an example assuming you'd want this to work for adding a user. > This could work perfectly, but I typed it by hand into this email so you > may need to debug some. > > app/States/ajax_list.ctp > > Contains > > > <?php foreach ($ajaxFunctions as $key => $value): ?> > > <option value="<?php echo $key; ?>"><?php echo $value; ?></option> > > <?php endforeach; ?> > > > > app/Users/add.ctp > Contains > > <?php > > > $this->Js->get('#UserCountryId')->event('change', > > $this->Js->request(array( > > 'controller'=>'states', > > 'action'=>'ajax_list' > > ), array( > > 'update'=>'#UserStateId', > > 'async' => true, > > 'method' => 'post', > > 'dataExpression'=>true, > > 'data'=> $this->Js->serializeForm(array( > > 'isForm' => true, > > 'inline' => true > > )) > > > )) > ); > > > ?> > > > app/Controller/StatesController.php > Contains > > /** > > * ajax_list method > * > > * @return void > > */ > public function ajax_list() { > > $this->State->recursive = 0; > > $country_id = $this->request->data['User']['country_id']; > > $ajaxFunctions = $this->AclFunction->find('list', array( > > 'conditions' => array('State.country_id' => $country_id) > > )); > > > $this->set('ajaxFunctions', $ajaxFunctions); > > $this->layout = 'ajax'; > > } > > > > > On Wed, May 23, 2012 at 5:52 PM, Kennix <kehindeaded...@gmail.com> wrote: > >> I need a tutotial on how to implement chain select with CakePHP >> >> example, on selecting a Country from Countries drop down option, the >> State in the selected should populated >> >> -- >> 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 >> cake-php+unsubscr...@googlegroups.com For more options, visit this group >> at http://groups.google.com/group/cake-php >> > > -- > 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 > cake-php+unsubscr...@googlegroups.com For more options, visit this group > at http://groups.google.com/group/cake-php > -- *Kehinde Adedipe* *+234-803-755-4807* *+234-807-143-6759* -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php