![]() |
|
Snippets |
|
When working with the admin generator in Symfony 1.2, I found I could no longer use the doctrine_admin_double_list field type. After hours of searching, I finally figured out how to get this functionality back. It can no longer be done from the generator.yml file, instead you need to modify your table's form class, e.g. lib/form/doctrine/XXXForm.class.php:
class XXXForm extends BaseXXXForm { public function configure() { $this->widgetSchema['field_name'] = new sfWidgetFormDoctrineChoice(array( 'model' => 'ModelName', 'add_empty' => false, 'renderer_class' => 'sfWidgetFormSelectDoubleList', )); } }
This requires the sfFormExtraPlugin plugin to be installed.
I assume this will work equally well with Propel. See symfony Forms in Action for more info.