2011-08-23 44 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

相關問題