• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing instance to call form_input. Please help

#1
[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

#2
[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.

#3
[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

#4
[eluser]prashid[/eluser]
Anyone please

#5
[eluser]prashid[/eluser]
anyone?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.