Search code examples
phpkohanakohana-orm

Kohana Formo Error: Invalid method formo called in Model_User


Trying to use the Formo module with ORM and Kohana 3.1, but keep getting this error...

Invalid method formo called in Model_User

I get this error with any Model I try to use. The user model is the default one that comes with ORM. The code I try is as follows.

    $user = ORM::factory('user', 1);

    $form = Formo::form()
        ->orm('load', $user);

The Formo module is the newest one I could get from GitHub... v2.0RC2-24

I can't seem to figure out what it is that I could be doing wrong... thanks...


Solution

  • datasage you are correct, if you wish to "answer" the question I'll gladly hand over the answer to you. All I needed was to declare the formo() method in my models.

    class Model_User extends Model_Auth_User {
    
        // FOR FORMO
        public function formo()
        {
    
        }
    
    } // End User Model