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

Can not see forms dir

Hi everyone!

I have got a weird problem. Well I want add prepared forms to my application so like in the INVO I created a forms directory in the app directory and there I put a LoginForm.php. Like I saw I have to register this directory to use inside forms. So I did this:

loader.php


$loader->registerDirs(
    array(
        $config->application->controllersDir,
        $config->application->modelsDir,
        $config->application->pluginsDir,
        $config->application->formsDir // I'm talking about this line
    )
)->register();

Then I saw this:


Notice: Undefined property: Phalcon\Config::$formsDir in /var/www/html/phalcon/gotei/app/config/loader.php on line 13

And obviously I can't use my LoginForm cause the forms's directory isn't registered properly. What's wrong? I have plugins directory too and I haven't got any troubles with it.

Thanks for answers



43.9k

Hi,

error comes from loader.php Show us that file (and especially line 13 ;-))



34.6k
Accepted
answer

Hi,

error comes from loader.php Show us that file (and especially line 13 ;-))

I shown already, even I added a comment to this line...

Thank you very much Andres, now it's working :)