Welcome Guest, Not a member yet? Register   Sign In
Use Form helper inside a customer helper

I am working on code that will dynamically build a form based off of meta data. I added a helper called formBuilder to the formbuilder_helper.php file. I included the helper in my controller so that it could be used. The problem is that in the helper I need to use the CI Form helper but it won't load because $this does not exist.

Fatal error: Using $this when not in object context in C:\xampp\htdocs\sd\system\application\helpers\formbuilder_helper.php on line 8

How do I get this to work or should I be doing this a completely different way?

Check out http://ellislab.com/forums/viewthread/89976/

I think you're looking for

$CI =& get_instance();

Theme © iAndrew 2016 - Forum software by © MyBB