Symfony 1.4 - are forms always in <table>?

空扰寡人 提交于 2019-12-12 01:08:32

问题


I'm using sfDoctrineAllowPlugin. I need form which has Twitter's Bootstrap semantics. I looked into template and I found, that there is only $form, which is a <table>. How can I format it in my way? I don't want to use table, rows and cols.


回答1:


There are plenty of render* functions available to display each item in your form.

  • renderRow
  • renderLabel
  • render
  • renderError
  • etc ...

But you can also define a decorator (a custom sfWidgetFormSchemaFormatter) for your form to define the way each item will be display. Check this example of adding * for each required field.



来源:https://stackoverflow.com/questions/10109248/symfony-1-4-are-forms-always-in-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!