Form helper problems |
[eluser]coderx[/eluser]
I have loaded the form lib to $autoload['helper'] in autoload.php configuration section, but nothing happens ( the are no input fields on the page ) when I'm calling <?=form_input('userName',set_value('useeName'))?> in view template. The same problem is with form_password and form_login. Where the problem can be?
[eluser]fraserk[/eluser]
You need to look at the user guide again. http://ellislab.com/codeigniter/user-gui...elper.html Did how did you generate the code on the view page? It's should be like this.. Code: <?php echo form_input('username', 'johndoe'); ?>
[eluser]coderx[/eluser]
Here is my autoload.php Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Here is my view file: Code: <?=form_open(base_url().'main/login')?>
[eluser]coderx[/eluser]
[quote author="fraserk" date="1262919396"]You need to look at the user guide again. http://ellislab.com/codeigniter/user-gui...elper.html Did how did you generate the code on the view page? It's should be like this.. Code: <?php echo form_input('username', 'johndoe'); ?> [/quote] It was generated in view page. Solution for this issue was to enable PHP short tags in php.ini configuration file. So you have to set short_open_tag = On , or to set $config['rewrite_short_tags'] = TRUE. Big thanks to moodh-.
[eluser]WebsiteDuck[/eluser]
Make all of your form functions look like this <?php echo form_input('userEmail',set_value('userEmail')); ?> In your view code you are missing the "echo" in your userEmail input box <?=form_input('userEmail',set_value('userEmail'))?> This should work but your server may have short tags turned off. Edit: Ah sorry, too late
[eluser]coderx[/eluser]
[quote author="bkaxrf" date="1262920905"] Edit: Ah sorry, too late [/quote] Thank you anyway |
Welcome Guest, Not a member yet? Register Sign In |