Symfony:使用 $this->widgetSchema->setFormFormatterName('list') [英] Symfony: using $this->widgetSchema->setFormFormatterName('list')
本文介绍了Symfony:使用 $this->widgetSchema->setFormFormatterName('list')的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 $this->widgetSchema->setFormFormatterName('list');这边走下面将我的表单呈现为列表,但它仍然是一个表格.有什么想法吗?
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');
}
}
有什么想法吗?
贾维
推荐答案
要将格式化程序应用于所有表单,请在 config\ProjectConfiguration.class.php 的 setup() 中使用以下行
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');
}
}
这篇关于Symfony:使用 $this->widgetSchema->setFormFormatterName('list')的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文