I want to get value from a table to be populated in drop down select in a form. Here's the table and the fields for example: States fields:id, name In add function in StatesController, I add this piece of code (as I learnt from the tutorial): $state = $this->State->find('list'); $this->set('states',$state);
and I add this code in my view: echo $form->select('state', array($states)); when I debug the value of state drop down select, what I get is the id of state, not the name...what I want is the name, not the id..How can I do that ? Any help would be appreciated.. Thanks... -- View this message in context: http://old.nabble.com/Getting-values-from-drop-down-select-tp27557819p27557819.html Sent from the CakePHP mailing list archive at Nabble.com. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en