[symfony-users] Re: sfWidgetFormDoctrineChoice creates blank row when editing

2011-04-11 Thread Growiel
Bump please ! I can't believe nobody found this bug and it's really annoying :( On 24 mar, 11:09, Growiel wrote: > Hi. > > In every symfony 1.4 form I have, I have a problem when I use > sfWidgetFormDoctrineChoice. > > If i enable the "add_empty" option, I do have an empty choice at the > top of

[symfony-users] Re: sfWidgetFormDoctrineChoice to show non-multi selectable list

2010-09-18 Thread Martin Henits
well I found the answer, so I share it in case of any help for others. new sfWidgetFormDoctrineChoice(array( 'model' => $this->getRelatedModelName('myModule'), 'add_empty' => 'Please Select ...'), array('size' => '4')) On Sep 18, 4:57 pm, Martin Heni

[symfony-users] Re: sfWidgetFormDoctrineChoice

2010-05-07 Thread Tom Ptacnik
Probably you want to use a jQuery for that. muster: 1) Create a jQuery function onChange con_id select - do an ajax call of some action 2) in that action return (json) data with an id which you wan't to select in the the state_id select 3) then the jQuery callback function will add the selected at

[symfony-users] Re: sfWidgetFormDoctrineChoice problem

2010-04-27 Thread webdev_aw_ucsb
> 'profileid' => new sfWidgetFormDoctrineChoice(array('model' => > $this->getRelatedModelName('Profile'), 'add_empty' => false)), You can change the above code to include a method to call to display the column you want. For example: new sfWidgetFormDoctrineChoice(array('model' => $this- >getR

[symfony-users] Re: sfWidgetFormDoctrineChoice problems

2010-03-05 Thread Samuel Morhaim
More info: The same widget, generated with sfWidgetFormDoctrineChoice without passing any method for filtering (Notice it has one more value, of course because it is not filtered, but the value = id): Special Sale 30 Off 20 Off Code 20 Off Same field as above but using: = new sfWidgetFormChoi

[symfony-users] Re: sfWidgetFormDoctrineChoice - parameters for table_method

2009-09-15 Thread sikk
The best suggestion would be to create your own widget, and just apply the patch to it. The old one will still be supported, then the new one will have his own name. good luck. On Sep 15, 10:50 am, andrea cecchetto wrote: > Hi guys, > I need to pass some parameters to Option table_method on >

[symfony-users] Re: sfWidgetFormDoctrineChoice with i18n

2009-08-18 Thread asim nizam
$c = new Criteria(); $c->addSelectColumn(HrTblMarriagesPeer::ID); $c->addSelectColumn(HrTblMarriagesPeer::HR_TBL_PARTICULARS_ID); $c->addSelectColumn(HrTblMarriagesPeer::MAR_NAME_OF_SPOUSE); $c->add(HrTblMarriagesPeer::HR_TBL_PARTICULARS_ID,2);*/ $this->setWidgets(array(

[symfony-users] Re: sfWidgetFormDoctrineChoice with i18n

2009-08-17 Thread afilina
That code works perfectly. Thank you very much! --~--~-~--~~~---~--~~ 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

[symfony-users] Re: sfWidgetFormDoctrineChoice with i18n

2009-08-17 Thread Andrei Dziahel
Hi. Here is an excerpt from my blablaForm::setup(): > $this->setWidget('country', > new sfWidgetFormDoctrineSelect(array('model' => 'Country', > 'query' => Doctrine::getTable('Country')-> > createQuery('c')->leftJoin('c.Translation ct')->orderBy('c.order DESC, > ct.name ASC';

[symfony-users] Re: sfWidgetFormDoctrineChoice with i18n

2009-08-17 Thread afilina
Could you please demonstrate how to use this method? I didn't find anything useful in the documentation to help me. Say I want to get a list of products with their names from within my controller. Thanks, Anna --~--~-~--~~~---~--~~ You received this message because

[symfony-users] Re: sfWidgetFormDoctrineChoice with i18n

2009-08-16 Thread Andrei Dziahel
Hi. 1. No, it doesn't. 2. Yes, you can -- just pass your own query to widget using its "query" option. And, by magic implemented in sfDoctrineRecordI18nFilter::filterGet(), all the values become localized automatically. 2009/8/17 afilina > > I have a model generated with Doctrine named Product

[symfony-users] Re: SfWidgetFormDoctrineChoice - how do you filter values

2009-03-25 Thread fredlab
Thanks for the answer. Apologize if I ask again for some help. In fact, I am extending the admin generator to create a specific plugin and I want to generate the sfWidgetFormChoice ... with the query that return the filtered values so that I do not have to create a method in another class. Do yo

[symfony-users] Re: SfWidgetFormDoctrineChoice - how do you filter values

2009-03-24 Thread Ian P. Christian
2009/3/24 fredlab : > Thanks for the answers but even with the source code, I can't see how > to do it. > > What do you mean by table-method ? What is the difference between it > and the query option that is also available ? don't set a query option. instead, set a table_method - for example 'get

[symfony-users] Re: SfWidgetFormDoctrineChoice - how do you filter values

2009-03-24 Thread fredlab
Ian, Thanks for the answers but even with the source code, I can't see how to do it. What do you mean by table-method ? What is the difference between it and the query option that is also available ? Thanks for helping, Frédéric --~--~-~--~~~---~--~~ You receiv

[symfony-users] Re: SfWidgetFormDoctrineChoice - how do you filter values

2009-03-24 Thread Ian P. Christian
2009/3/24 fredlab : > > Hey, > > Imagine I have the following : > > $w = new sfWidgetFormDoctrineChoice(array( >  'model'     => 'Codetype', >  'add_empty' => false, > )); >From the source: 71 public function getChoices() 72 { 73 $choices = array(); 74 if (false !== $this->getOpt