Re: [symfony-users] Re: sfWidgetFormChoice

2011-01-05 Thread Emmanuel de Carvalho Garcia
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 = array(); foreach ($tmp as $t) { $values[$t] = $t } r

Re: [symfony-users] Re: sfWidgetFormChoice

2011-01-02 Thread Emmanuel de Carvalho Garcia
I tryed this. Stored "Array" string on my database. Em 30/12/2010, às 10:58, Massimiliano Arione escreveu: > On 29 Dic, 17:58, "emanu.ti" wrote: >> Hi, I want to use sfWidgetFormChoice with "multiple" => true >> parameter. Here is my code: > > You need to set "multiple" option in your validat

[symfony-users] Re: sfWidgetFormChoice

2010-12-30 Thread Massimiliano Arione
On 29 Dic, 17:58, "emanu.ti" wrote: > Hi, I want to use sfWidgetFormChoice with "multiple" => true > parameter. Here is my code: You need to set "multiple" option in your validator. cheers Massimiliano -- If you want to report a vulnerability issue on symfony, please send it to security at sy

[symfony-users] Re: sfWidgetFormChoice and setDefault

2010-09-13 Thread Svetoslav Shterev
Glancing through the code, the default option(what setDefault() does on a widget) doesn't seem to be used at all in the choice widgets. At any rate, you should be using the form's "default" fields, instead of the widget's. $this->setDefault('priority', max(...)); The widget's default value(if us

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

2010-09-06 Thread Hugo Chinchilla
On Mon, Sep 6, 2010 at 7:10 PM, Richtermeister wrote: > What happens if you run the query manually against the database? > Could be that you're doing a non-optimized join or so... > > Daniel No, the select is very simple, is a select over 3 columns from only one table. All the logic is fine and

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

2010-09-06 Thread Richtermeister
What happens if you run the query manually against the database? Could be that you're doing a non-optimized join or so... Daniel On Sep 6, 4:13 am, Hugo Chinchilla wrote: > Hi, > > for my app's backend I have written a custom method to draw a select > widget which was consuming a lot of memory

[symfony-users] Re: sfWidgetFormChoice

2010-06-16 Thread Joe
It worked ! Thank you ^^ On Jun 15, 1:18 pm, Gábor Fási wrote: > "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 w

[symfony-users] Re: sfWidgetFormChoice rendered as an unordered list

2010-03-26 Thread Tom Ptacnik
I think there isn't an option, because this widged is for checkboxes, selects and so on.. (form items) You have to write your own widget for UL On 25 bře, 17:23, HiDDeN wrote: > Hello. > > Is there some way to render a sfWidgetFormChoice as an unordered list? > > In the API there is an option c

[symfony-users] Re: sfWidgetFormChoice and Foreign keys problems!

2010-02-05 Thread Tom Ptacnik
I think symfony can't know what you want to display If you don't tell it... ;) Show me your schema.yml file (at least part with Empressas specification) On 4 ún, 16:09, wueb wrote: > On 4 Fev, 14:52, Tom Ptacnik wrote: > > > 1 st problem > > try to do: > > >  protected function doUpdateObject

[symfony-users] Re: sfWidgetFormChoice and Foreign keys problems!

2010-02-04 Thread wueb
On 4 Fev, 14:52, Tom Ptacnik wrote: > 1 st problem > try to do: > >  protected function doUpdateObject($values) >   { >      print_r($values['id_empresa']); > >      parent::doUpdateObject($values); >   } > Thanks i will try. > 2 nd > I don't understand what are you trying to do. And what doe

[symfony-users] Re: sfWidgetFormChoice and Foreign keys problems!

2010-02-04 Thread wueb
On 4 Fev, 14:52, Tom Ptacnik wrote: > 1 st problem > try to do: > >  protected function doUpdateObject($values) >   { >      print_r($values['id_empresa']); > >      parent::doUpdateObject($values); >   } > Thanks i will try. > 2 nd > I don't understand what are you trying to do. And what doe

[symfony-users] Re: sfWidgetFormChoice and Foreign keys problems!

2010-02-04 Thread Tom Ptacnik
1 st problem try to do: protected function doUpdateObject($values) { print_r($values['id_empresa']); parent::doUpdateObject($values); } 2 nd I don't understand what are you trying to do. And what does mean "they are both foreign keys from same fields"? Probably you want to do so

[symfony-users] Re: sfWidgetFormChoice and Foreign keys problems!

2010-02-02 Thread wueb
Hello Tom, $empresas had a array with values and descriptions to put on the select. But right now my major problem is the 2nd. Any idea? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googl

[symfony-users] Re: sfWidgetFormChoice and Foreign keys problems!

2010-02-02 Thread Tom Ptacnik
What do you have in the $empresas variable? how your action code? On 1 ún, 18:53, wueb wrote: > 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: > > $th

[symfony-users] Re: sfWidgetFormChoice and Foreign keys problems!

2010-02-02 Thread wueb
!! -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this

[symfony-users] Re: sfWidgetFormChoice and Foreign keys problems!

2010-02-02 Thread wueb
Anyone please? :( -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options,

[symfony-users] Re: sfWidgetFormChoice

2009-08-29 Thread Richtermeister
Hey mattsister , I've had the same issue, and there's an easy fix. The reason is that text fields really submit 2 values, the text content and the "is_empty" flag, so they arrive as an array. When you switch that to a select, it arrives as a single value, and won't be processed correctly. The so

[symfony-users] Re: sfWidgetFormChoice

2009-08-28 Thread adrianrz
Hi, could be more explicit? eg. show us the part of the scheme that is affected by the filter and the module generator.yml regards Adrián On Aug 27, 11:21 pm, mattsister wrote: > I have a TINYINT column in my db that represent the month. In the > filter section of my backend I want a select

[symfony-users] Re: sfWidgetFormChoice and empty value

2009-03-06 Thread Tomasz Ignatiuk
Maybe it is, but you're creating options for this as an array, am I right? So you can add at the begining an empty option. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group,