2011-08-23 34 views

回答

1

试试这个在您的表单类:

$this->widgetSchema['your_choice_field'] = new sfWidgetFormDoctrineChoice(
    array(), // you have to fill this array with your option (model, multiple, expanded ...) 
    array('size' => 5) // Attributes array here you can set attribute that will appear on the element 
); 

希望它可以帮助

+0

干杯该提醒。我结束了使用$ this-> widgetSchema ['field'] - > setAttribute('size',6); – jdog

相关问题