CodeIgniter Forums
Passing instance to call form_input. Please help - 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: Passing instance to call form_input. Please help (/showthread.php?tid=34307)



Passing instance to call form_input. Please help - El Forum - 09-25-2010

[eluser]prashid[/eluser]
Hi,

if I am passing instance in array to view than how can I call form_input function.
Code:
Controller
$data['ci'] = &get;_instance();

View
$ci->???->form_input($username)


Thanks


Passing instance to call form_input. Please help - El Forum - 09-25-2010

[eluser]Twisted1919[/eluser]
once you load the form validation library, it auto loads the form helper, so in your views you would simply call
Code:
form_input('username');


Take a look at the user guide.


Passing instance to call form_input. Please help - El Forum - 09-25-2010

[eluser]prashid[/eluser]
I am sorry that I should have cleared that already. I am using Smarty Template and I need to call form_input() function like below in curly braces

Code:
Controller
$data['ci'] = &get;_instance();

CI View
form_input($username)

like in MSARTY template .tpl
{$ci->???->form_input($username)}
Look at this thread
http://ellislab.com/forums/viewreply/803380/

Thanks


Passing instance to call form_input. Please help - El Forum - 09-26-2010

[eluser]prashid[/eluser]
Anyone please


Passing instance to call form_input. Please help - El Forum - 09-27-2010

[eluser]prashid[/eluser]
anyone?