Welcome Guest, Not a member yet? Register   Sign In
Calling index() on form validation failure
#1

Hello, I'm doing something like this in my controller:

PHP Code:
       if ($this->form_validation->run() == FALSE) {
 
           $this->index();
 
       } else {
 
           $this->load->view('template/meta-head'$custom);
 
           $this->load->view('template/header');
 
           $this->load->view('fastauditthx');
 
           $this->load->view('template/footer'$custom);
 
       

Basically, if form fails, send back to form, if good, then send to "Thank you view".

For testing I have added only one set_rules() rule:

PHP Code:
$this->form_validation->set_rules('f_eventname''Event Name''required|trim|min_length[3]|max_length[100]|callback_customAlpha'); 

The action goes to index as expected, but f_eventname always seems to fail, no matter what I put in there.

callback_customAlpha is in a helper file that is loaded in the construct function.

Anyway, I thought I'd post here to see what you all think as my eyes are "end of day eyes" right now.

Thanks,
Donovan
Reply


Messages In This Thread
Calling index() on form validation failure - by dbrooke - 10-25-2016, 12:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB