问题
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