everytime i get to use renderBody() with cform i get this error:
Fatal error: Call to a member function error() on a non-object in C:\Program Files (x86)\EasyPHP-5.3.2i\www\yii-1.1.5\framework\web\form\CFormInputElement.php on line 212
what makes "getActiveFormWidget()" return null when using renderBody() instead of render();
public function renderError()
{
$parent=$this->getParent();
return $parent->getActiveFormWidget()->error($parent->getModel(), $this->name, $this->errorOptions);
}
If I’m not mistaken, you are suggesting, that there is an error in yii core files, however the error message you provided would rather suggest that it is in your own code. Are 100% sure that you are calling renderBody() on a variable being true object and being a CForm instance? Maybe you made a typo somewhere. Tried to use var_dump or print_r on this variable to see, what it actually is?
thankkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkks many many m Mdomda
dude u have found the problem.
it works like a sharm. But i think that ur solution is a turnarround of the problem, i guess renderBody should work without a need of renderBegin and renderend otherwise, renderbody must be a private method that has to be overrided by a public one that will include in its definition renderbegin/end…
I hope that this will be taken in consideration in future updates!!!