On Tue, Feb 22, 2011 at 9:57 AM, Stephen <[email protected]> wrote: > try: > > $charities = $this->Campaign->Charity->find('list', array('fields' => > array('Charity.id', 'Charity.charity_name'))); > > And then > > echo $this->Form->input('Charity.charity_name', array('options' => > $charities)); > > (It would automatically select the columns "id" and "name" but I think if > they are different you need to specify, I may be wrong).
This isn't quite right. The input is for 'Charity.charity_name' but the value that will be passed back to the server is the Charity.id (which is correct). -- 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
