2012-04-11 53 views
0

我正在使用sfDoctrineAllowPlugin。我需要具有Twitter的Bootstrap語義的表單。我看着模板,發現只有$form,這是一個<table>。我怎樣才能以我的方式進行格式化?我不想使用表格,行和列。Symfony 1.4 - 形式總是在<table>?

回答

2

plenty of render* functions available來顯示您的表單中的每個項目。

  • renderRow
  • renderLabel
  • 渲染
  • renderError
  • 等...

但你也可以爲您的形式來定義一個裝飾(自定義sfWidgetFormSchemaFormatter)每個項目都會顯示出來。檢查this example爲每個必填字段添加*。