2

I want to ask. what if I have a form in a (View folder) gatepass.php and this page was called by (view)main_frame page navigator/menu bar unto its page. this main_frame page was called by the controller home.php

how can I call the form into the gatepassController.php? can I do that? I want gatepassController.php to control the form in gatepass.php so that the home.php won't be crowded by other pages.

I also have this error:

Fatal error: Call to undefined function form_open() in C:\xampp\htdocs\project\application\views\gatepass.php on line 109

I don't know where to call that form. It is very important to me. Thank you in advance.

1 Answer 1

2

This error is occur because you forgot to load the form helper. Add below code in application/config/autoload.php or

$autoload['helper'] = array('url','text','form');

OR

Add the following line into your controller before loading the view:

$this->load->helper('form');

Read Document

Sign up to request clarification or add additional context in comments.

3 Comments

how can I add application/config/autoload.php? and where do I add this?
you sure? this what I get.. Fatal error: Call to a member function helper() on a non-object in C:\xampp\htdocs\nici_cs\application\config\autoload.php on line 115
yes. thank you very much!! but how can I call the form in gatepasscontroller.php? let's say that the name of the form is gatepassform. I'm really sorry for causing you trouble.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.