set_value not working? |
[eluser]MTWIGG[/eluser]
I am creating my first form based on the example http://ellislab.com/codeigniter/user-gui...ation.html (my autoload has $autoload['helper'] = array('url'); which is the main difference) I have just one text field and whilst the validation works, set_value() is not working. The view is... <?php echo validation_errors(); ?> <?php echo form_open('forgotten'); ?> Please enter your email. Your password will be sent to you.<br/> Email Address: <input type="text" name="email" value="" size="100" value="<?php echo set_value('email'); ?>" /> <div><input type="submit" value="Submit" /></div> </form> ... and the controller is ... <?php class Forgotten extends CI_Controller { function Forgotten() { parent::__construct(); $this->load->helper('form'); } public function index() { $this->load->library('form_validation'); $this->form_validation->set_rules('email', 'Email Address', 'required|valid_email'); if ($this->form_validation->run() == FALSE) { $this->load->view('forgotten_body'); } else { $this->load->view('forgottensent_body'); } } } ?> |
Messages In This Thread |
set_value not working? - by El Forum - 07-01-2011, 05:23 AM
set_value not working? - by El Forum - 07-01-2011, 07:18 AM
set_value not working? - by El Forum - 07-01-2011, 07:22 AM
set_value not working? - by El Forum - 07-01-2011, 07:40 AM
set_value not working? - by El Forum - 07-01-2011, 08:02 AM
set_value not working? - by El Forum - 07-01-2011, 08:09 AM
set_value not working? - by El Forum - 07-07-2011, 01:07 AM
set_value not working? - by El Forum - 07-07-2011, 01:35 AM
set_value not working? - by El Forum - 07-07-2011, 02:11 AM
|