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
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
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
> '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
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
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
>
$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(
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
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';
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
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
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
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
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
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
15 matches
Mail list logo