Calling controller method that generate the form_builder in template.
Good evening,
I have a question about calling the controller method that return a form_builder html to my "_layout/footer.php" please.
I would like to ask for your opinion about the best way to implement this.
I like the post checking method that come with fuel and this form will be use in another template as well.
Thank you.
Comments
$CI =& get_instance(); /* Email Form */ $CI->load->controller('send_email'); $vars['email_form'] = $CI->send_email->generate_email_form();
Then I can use this email_form variables in my templete?
When I try this code, it gave me an error said call to undefined method.
What would you suggest me to be able to pass the method from my controller into the _variables?
Thank you.
$CI =& get_instance(); /* Email Form */ $CI->load->library('send_email'); $vars['email_form'] = $CI->send_email->generate_email_form();