[symfony-users] Problem getting unique values in a drop down menu

2010-11-20 Thread apc...@dsl.pipex.com
I am trying to produce a drop down menu list with values taken from a
database table.

I want the values displayed from the table to be unique even though
there are values in the database table are not.
At the moment I have repeated values showing in the drop down list.
How can I show a list of unique items to display in the drop down
menu ?

The code I am using to get the contents of the database is


'qualificationType' = new sfWidgetFormDoctrineChoice(
 array(
 'model' = 'EducationalQualifications',
 'add_empty' = true,
 'method' = 'getQualificationType',
 'label' = 'Educational qualification'
 )
 ),

The table is called EducationalQualifications. The code is held in
the
actions.class.php


Thank you 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
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Problem with making a drop down menu from a table

2010-11-11 Thread apc...@dsl.pipex.com
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
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Problem with making a drop down menu from a table

2010-11-11 Thread apc...@dsl.pipex.com
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.comsymfony-users%2bunsubscr...@goog­legroups.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
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Multiple Forms on one page ??

2010-10-30 Thread apc...@dsl.pipex.com

I wonder if it is possible to display multiple forms on a web page
using symfony. Each of these forms should have a drop down menu. Each
of the forms is derived from a different table in a database.  Is it
possible to just to have the one send button which will only send data
of the table which has it’s data selected/highlighted.

any help greatly appreciated

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
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Problem with drop down menu

2010-10-29 Thread apc...@dsl.pipex.com
Thanks , the _toString() method did the trick.  excellent !!!

Reto

On Oct 29, 10:14 am, Gareth McCumskey gmccums...@gmail.com wrote:
 What code are you using to fill it with data or to create the drop down
 itself? Do you have a __toString() magic method defined in your Sectors
 class?





 On Thu, Oct 28, 2010 at 10:45 PM, reto apc...@dsl.pipex.com wrote:
  My current project is producing an error message which I have not seen
  before. There is a problem with the contents of a drop down menu. Instead of
  the contents of a table called Sectors, which are in fact job titles. I am
  getting an error in each slot  saying No description for object of class
  Sectors  . I thought symfony would automatically fill this drop down menu
  with the table contents.

  I have filled the table Sectors with logical data.

  Any ideas ??

  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.comsymfony-users%2bunsubscr...@goog­legroups.com
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

 --
 Gareth McCumskeyhttp://garethmccumskey.blogspot.com
 twitter: @garethmcc- Hide quoted text -

 - Show quoted text -

-- 
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


[symfony-users] help needed for newbie

2010-10-22 Thread apc...@dsl.pipex.com
I am a bit new to this symfony framework. I am having a problem seeing
the images on the  Symfony Project Created page. I can see all the
writing but no pictures. I installed the project using netbeans. I am
attempting to do the project described on the main site
http://www.symfony-project.org/. I am on day one.
It says, if I get no images that  I should check that my server can
see the path symfony_data/web/sf/directory.

How do i do this

Any help much appreciated

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
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en