![]() |
Use Form helper inside a customer helper - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Use Form helper inside a customer helper (/showthread.php?tid=13314) |
Use Form helper inside a customer helper - El Forum - 11-18-2008 [eluser]spyro[/eluser] 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. Error: 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? Use Form helper inside a customer helper - El Forum - 11-19-2008 [eluser]DPrevite[/eluser] Check out http://ellislab.com/forums/viewthread/89976/ I think you're looking for Code: $CI =& get_instance(); |