The first thing to try is a different form layout! The default layout in Clonefish is "tabular", however, the "rowbyrow" layout is the one that gives the result you're looking for: a form without table, tr and td tags, with input fields below labels. To change the layout, just add the following:
Code:
$form->layout = 'rowbyrow';
Additionally, the easiest way to get the radio layout is
Code:
'itemlayout' => '%radio% %label%<br />'
(as the radio button sizes are equal, all the buttons will align fine)
Well, that sums up the solution - now some notes on what the problem was. Clonefish renders the forms based on the $form->layouts[ $form->layout ] array.
Element row HTML code (including the displayname, actual input field, etc.) comes from $form->layouts[ $form->layout ]['element'], and can be overridden by the 'rowlayout' setting for an element.
The 'layout' setting for an element is strictly related to the element itself - not the entire row. Let's assume we follow the harder path, and go on with the default "tabular" form layout. In this case we need to cope with the table tags provided by the tabular layout, and so should create the following config to achieve the same results:
Code:
$config = Array(
'element' => Array(
'type' => 'inputRadio',
'rowlayout' => // entire input element row, colspan'd to fit the layout
'<tr %errorstyle%>'.
'<td colspan="3">' .
'<label for="%id%">%displayname%</label>%erroricon%<br />' .
'%prefix%%element%%postfix%<br />' .
'%errordiv%' .
'</td></tr>',
'layout' => '<table>%s</table>', // container for the radio options
'itemlayout' => '<tr><td>%radio%</td><td>%label%</td></tr>', // actual radio option layout
)
);
I hope the above helped you. You can find further details on page 3 of the Tour, and on the class properties page in the Reference.