I have a question, I have a dropdown that needs to be populated from the database, but with a query, and the query is based on a post variable.
I know that sfWidgetFormDoctrineChoice has an option for passing a method, but I can't pass a method + parameter like that. So I used the simple sfWidgetFormChoice with the choice value being the Doctrine getTable and the parameter.. as shown in the bottom of this email.. HOWEVER, the dropdown is not well populated. The dropdown is formed like this: <option value="0">20 Off Code</option> <option value="1">Special Sale</option> <option value="2">30 Off</option> This is incorrect, since the value for 20 Off Code is not 0 , is actually 1 so the index is wrong. $this->widgetSchema['campaign_id'] = new sfWidgetFormChoice(array ( 'choices' => Doctrine::getTable('Campaign')->getCampaigns(sfContext::getInstance()->getUser()->getGuardUser()->Organization) )); What can I do ? Thank you. -- 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