I use this code to create my form:
$form=$controller->beginWidget('CActiveForm', array(
'id'=>'my-form',
'enableAjaxValidation'=>false
));
When I do this, it prints the form. But I want to put this in a variable, because the entire form is returned as string in the method. How can I do this?