开发者

Symfony: using $this->widgetSchema->setFormFormatterName('list')

开发者 https://www.devze.com 2022-12-29 17:02 出处:网络
im using $this->widgetSchema->setFormFormatterName(\'list\'); this way below to render my form as a list but it is still a t开发者_开发技巧able. Any idea?

im using $this->widgetSchema->setFormFormatterName('list'); this way below to render my form as a list but it is still a t开发者_开发技巧able. Any idea?

public function configure()
  {

            parent::configure();

            $this->widgetSchema->setFormFormatterName('list');

  }

}

Any idea?

Javi


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');
  }

}
0

精彩评论

暂无评论...
验证码 换一张
取 消