I have a sfWidgetFormChoice which renders checkboxes in Symfony 1.4. The problem I have is that I want to rend each choice as a row in a table. So my html would ideally be something like this:
<tr><td>Choice 1</td></tr>
<tr><td>Choice 1</td></tr>
<tr><td>Choice 1</td></tr>
.
.
.
So that it would render as a table instead of a list.
Thanks!
In your form called
MyFormcreate the following widget:Then add the following formatter method called
MyFormatter:I used for choices to be rendered as checkboxes by setting
renderer_classoption tosfWidgetFormSelectCheckboxin widget definition you can usesfWidgetFormSelectRadioto render it to radio buttons and you can call another formatter from another form by changingarray('formatter' => array('MyForm', 'MyFormatter')).