问题
im using $this->widgetSchema->setFormFormatterName('list'); this way below to render my form as a list but it is still a table. Any idea?
public function configure()
{
parent::configure();
$this->widgetSchema->setFormFormatterName('list');
}
}
Any idea?
Javi
回答1:
to apply a formatter to all the forms use the following line in the setup() of your config\ProjectConfiguration.class.php
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
sfWidgetFormSchema::setDefaultFormFormatterName('list');
}
}
来源:https://stackoverflow.com/questions/2808288/symfony-using-this-widgetschema-setformformatternamelist