CodeIgniter Forums
Form helper doesn't load - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: Form helper doesn't load (/showthread.php?tid=63006)



Form helper doesn't load - webdivision - 09-15-2015

Hello everbody, i am new to the forum but worked with codegniter a lot of times in the past few years.

I have a strange issue, when i am calling the function form_open() from the form helper, i got an php error:

Fatal error: Call to undefined function form_open() in /public_html/application/views/home/homepage_test.php on line 91
A PHP Error was encountered

Severity: Error

Message: Call to undefined function form_open()

Filename: home/homepage_test.php

Line Number: 91

Backtrace:

I call the function form in the autoloader, and any other model, libraries of helpers are loaded fine. So i have tried to remove the form loader from the autolader and load them manually in the controller before i am calling the view, but this also doesn't work. Do someone from the forum maybe have an idea what the error is?

I am using PHP 5.5.25


RE: Form helper doesn't load - PaulD - 09-16-2015

It does sounds like you are not loading the form helper: $this->load->helper('form');

Although if you are sure you are, can you show the code you are using on homepage_test.php on line 91 and surrounding relevant code? I would normally expect to see the form_open used in a view file, not the controller.

The format should be of the form described in the docs here: http://www.codeigniter.com/user_guide/helpers/form_helper.html#form_open

Best wishes,

Paul.


RE: Form helper doesn't load - webdivision - 09-17-2015

homepage_test.php is a view, but yesterday i solved the problem by overwrite the system folder, i think some files where corrupted. All is working fine now Wink Thank you guys for thinking