We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

INVO Form Undefined when getRender

I tried to create a showAction for my angular UI and it's mirror only the content of indexAction in RegisterController

public function showAction()
{
    $this->view->setRenderLevel(
        View::LEVEL_LAYOUT
    );
    echo $this->view->getRender('register', 'index');
}

But it said $form = Undefined when i tried to access to register/show, seem like getRender didn't add "$form = new RegisterForm;", anyone know how to fix this, please?



3.3k
Accepted
answer

Ah, i solved it with $this->$view->$form= new ...