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, apc...@dsl.pipex.com <apc...@dsl.pipex.com>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é <alexandre.sal...@gmail.com> > 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, "apc...@dsl.pipex.com" <apc...@dsl.pipex.com> 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 symfony-users@googlegroups.com > > To unsubscribe from this group, send email to > > symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> > <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 symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> > 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 symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en