[symfony-users] sfWidgetFormChoice

2010-06-15 Thread Joe
I am working on a module generated by the admin generator. I added the sfWidgetFormChoice widget to the lib/form file, like this : class MyModule extends BaseMyModule { public function configure() { $this->widgetSchema['field'] = new sfWidgetFormChoice (array( 'cho

[symfony-users] sfWidgetFormChoice

2010-12-29 Thread emanu.ti
Hi, I want to use sfWidgetFormChoice with "multiple" => true parameter. Here is my code: 'leavewhenempty' => new sfWidgetFormChoice( array('multiple' => true, 'expanded' => true, 'choices' => Doctrine_Core::getTable('FilaDeAtendimento')- >getOptionsLeaveWhenEmpty())

[symfony-users] sfWidgetFormChoice

2011-01-14 Thread sinu govind
Hi all, I have the following in my schema.yml title: type: enum length: 2 values: [Mr, Ms] default: Mr In my databases.yml, I have given attributes: use_native_enum: true In my registration form, I have $this->setWidget('title', new sfWi

[symfony-users] sfWidgetFormChoice

2009-08-27 Thread mattsister
I have a TINYINT column in my db that represent the month. In the filter section of my backend I want a select instead of an input text. So I made this in my filter class: $mese_choices = array( '' => 'Tutti i mesi', 1 => 'Gennaio', 2 => 'Febbraio', 3 => 'Marzo',

Re: [symfony-users] sfWidgetFormChoice

2010-06-15 Thread Gábor Fási
"choices" => array( "choice1" => "choice1", "choice2" => "choice2", ); On Tue, Jun 15, 2010 at 10:24, Joe wrote: > I am working on a module generated by the admin generator. I added the > sfWidgetFormChoice widget to the lib/form file, like this : > > class MyModule extends BaseMyModule > { >

Re: [symfony-users] sfWidgetFormChoice

2011-01-05 Thread Gareth McCumskey
What version of symfony are you using? sfWidgetFormChoice only exists for symfony 1.4. On Wed, Dec 29, 2010 at 6:58 PM, emanu.ti wrote: > Hi, I want to use sfWidgetFormChoice with "multiple" => true > parameter. Here is my code: > > 'leavewhenempty' => new sfWidgetFormChoice( >

Re: [symfony-users] sfWidgetFormChoice

2011-01-05 Thread Emmanuel
symfony 1.4.8. On this message i post how i solved my problem. Hi, i solved my problem puting this code in my model: public function setMyField ($value) { $this->_set("my_field", implode("|", $value)); } public function getMyField () { $tmp = explode("|",$this->_get("my_field")); $values = ar

Re: [symfony-users] sfWidgetFormChoice

2011-01-14 Thread Gareth McCumskey
What does your action and template look like where you use the form? On Thu, Jan 13, 2011 at 2:25 PM, sinu govind wrote: > Hi all, > > I have the following in my schema.yml > > title: > type: enum > length: 2 > values: [Mr, Ms] > default: Mr > > In my databases.yml, I hav

[symfony-users] sfWidgetFormChoice and setDefault

2010-09-10 Thread torok84
I have this code in a doctrine form $this->widgetSchema['priority'] = new sfWidgetFormChoice( array( 'choices' => $pri_choices )); var_dump($pri_choices); echo max(array_keys($pri_choices)); $this->widgetSchema['priority']- >setDefault( max(array_key

[symfony-users] sfWidgetFormChoice radio and title

2010-10-16 Thread Tipoun
Hello, I have a problem to set title of each radio buttons (separately). When, I change title attribute: $this->widgetSchema['test'] = new sfWidgetFormChoice(array('choices' => array('one' => 'one', 'two' => 'two', 'three' => 'three'), 'expanded' => true), array('title' => array('one' => 'First on

[symfony-users] sfWidgetFormChoice and empty value

2009-03-04 Thread Paolo Mainardi
Why doesn't exist an option for setting an empty value on this Widget ? I'm going crazy! Cheers -- Paolo Mainardi Vice Presidente Assoc.ILDN (http://www.ildn.net) Blog: http://www.paolomainardi.com --~--~-~--~~~---~--~~ You received this message because you are

[symfony-users] sfWidgetFormChoice and Foreign keys problems!

2010-02-01 Thread wueb
Hi. I'm having 2 problems and i though someone here could help me. 1st PROBLEM: I have a widget called "id_empresa" which is a sfWidgetFormChoice with multiple choices, like this: $this->widgetSchema['id_empresa'] = new sfWidgetFormChoice( array( 'choices' => $empresa

[symfony-users] sfWidgetFormChoice rendered as an unordered list

2010-03-25 Thread HiDDeN
Hello. Is there some way to render a sfWidgetFormChoice as an unordered list? In the API there is an option called 'renderer_class' but I can't find any documentation or example about it. Thanks! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-

[symfony-users] sfWidgetFormChoice with custom query slower than sfWidgetFormPropelChoice generated by default

2010-09-06 Thread Hugo Chinchilla
Hi, for my app's backend I have written a custom method to draw a select widget which was consuming a lot of memory to generate. The default form generated a select widget from the model populating full objects just to render an options list which only needs a PK and a string, so I wrote a method