If you are using Propel its not sfWidgetFormChoice but * sfWidgetFormPropelChoice*. sfWidgetFormChoice (what you currently have) requires you to provide it a list of options for the drop down.
On Fri, Nov 12, 2010 at 2:27 AM, [email protected] <[email protected]>wrote: > Thank you for taking time to help me. > > My code is now: > > > $this->form = new sfForm(); > $this->form->setWidgets(array( > > > 'section_id' => new sfWidgetFormChoice(array( > 'model' => 'sectors', > 'column' => 'sectorTitle' > ) > ))); > > > But I still get another error: sfWidgetFormChoice does not support the > following options: 'model', 'column'. > > Anymore ideas ? > > On Nov 12, 12:06 am, Alexandre Salomé <[email protected]> > wrote: > > Add new before sfWidget... : you are instanciating an object, not calling > a > > function > > > > --- > > Alexandre Salomé -http://alexandre-salome.fr > > > > Le 12 nov. 2010 01:04, "[email protected]" <[email protected]> a > > écrit : > > > > All I am trying to do is make a drop down menu from a table in a > > database. > > I think I need to place some code in an action class. > > > > The table is called 'sectors. > > The column I would like to see in the drop down menu is is > > 'sectorTitle' > > ' > > The code I am using is: > > > > $this->form = new sfForm(); > > $this->form->setWidgets(array( > > > > 'section_id' => sfWidgetFormChoice(array( > > 'model' => 'sectors', > > 'column' => 'sectorTitle' > > ) > > ))); > > > > But I get an error message saying : > > > > Call to undefined function sfWidgetFormChoice() > > > > Does anyone know what I am doing wrong ? > > > > Thanks Reto > > > > -- > > If you want to report a vulnerability issue on symfony, please send it to > > security at symfony-project.com > > > > You received this message because you are subscribed to the Google > > Groups "symfony users" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected]<symfony-users%[email protected]> > <symfony-users%2bunsubscr...@googlegroups.com> > > For more options, visit this group athttp:// > groups.google.com/group/symfony-users?hl=en > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<symfony-users%[email protected]> > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" 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/symfony-users?hl=en
