Welcome Guest, Not a member yet? Register   Sign In
Logic for multi-step form.. not working.
#5

[eluser]tomclowes[/eluser]
The idea is to have everything in one page http://domain.com/controller_name

The view that is loaded is simply dependent on the session keys/form validation.

This is the extent of my code at this point as it has not been working as expected.

Thanks



Code:
function index()
{


if(!$this->session->userdata('form_stage'))
        {

            if ($this->form_validation->run('suggest_1') == FALSE)
            {

//LOAD FORM 1 VIEW

            }
            else
            {
                
                $this->session->set_userdata('form_stage', 'step_2');
                
            }
        }
        
        if($this->session->userdata('form_stage')=='step_2')
        {
            if ($this->form_validation->run('suggest_2') == FALSE)
            {
//LOAD FORM 2 VIEW
            }
            else
            {
                
                $this->session->set_userdata('form_stage', 'complete');
                
            }
        }
        
        if($this->session->userdata('form_stage')=='complete')
        {
//LOAD COMPLETE VIEW
        }  
}


Messages In This Thread
Logic for multi-step form.. not working. - by El Forum - 09-07-2010, 04:44 PM
Logic for multi-step form.. not working. - by El Forum - 09-08-2010, 04:14 AM
Logic for multi-step form.. not working. - by El Forum - 09-08-2010, 09:34 AM
Logic for multi-step form.. not working. - by El Forum - 09-08-2010, 09:38 AM
Logic for multi-step form.. not working. - by El Forum - 09-08-2010, 10:35 AM
Logic for multi-step form.. not working. - by El Forum - 09-08-2010, 11:50 AM
Logic for multi-step form.. not working. - by El Forum - 09-08-2010, 12:17 PM
Logic for multi-step form.. not working. - by El Forum - 09-08-2010, 12:29 PM
Logic for multi-step form.. not working. - by El Forum - 09-08-2010, 12:34 PM
Logic for multi-step form.. not working. - by El Forum - 09-08-2010, 12:40 PM
Logic for multi-step form.. not working. - by El Forum - 09-08-2010, 01:07 PM
Logic for multi-step form.. not working. - by El Forum - 09-08-2010, 01:18 PM
Logic for multi-step form.. not working. - by El Forum - 09-08-2010, 01:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB