Welcome Guest, Not a member yet? Register   Sign In
checkbox array
#9

[eluser]DIG[/eluser]
alpar, thanks for the help.

I rewrite test controller:
Code:
<?php
class test extends controller {

    function index(){
        $this->load->library('validation');

        $rules['test'] = "callback_test_check";
        $this->validation->set_rules($rules);

        $fields['test']    = '"test checkbox"';
        $this->validation->set_fields($fields);

        if ($this->validation->run() == FALSE){
            $this->load->view('test');
        }else{
            $this->load->view('test');
        }
    }

    function test_check()
    {
      if(isset($_POST['test'])){
        $this->validation->set_message('test_error', 'Checked!');
        return TRUE;
      }else{
        $this->validation->set_message('test_error', 'Not Checked!');
        return FALSE;
        }
    }
}
?>
And try again name="test[]", name="test" and name="test[1]", but bash is not working...
I am at a loss.


Messages In This Thread
checkbox array - by El Forum - 08-31-2007, 12:51 PM
checkbox array - by El Forum - 08-31-2007, 01:24 PM
checkbox array - by El Forum - 08-31-2007, 01:33 PM
checkbox array - by El Forum - 08-31-2007, 01:52 PM
checkbox array - by El Forum - 08-31-2007, 02:32 PM
checkbox array - by El Forum - 08-31-2007, 04:19 PM
checkbox array - by El Forum - 08-31-2007, 04:21 PM
checkbox array - by El Forum - 08-31-2007, 04:38 PM
checkbox array - by El Forum - 08-31-2007, 10:49 PM
checkbox array - by El Forum - 09-01-2007, 04:38 AM
checkbox array - by El Forum - 09-01-2007, 06:31 AM
checkbox array - by El Forum - 09-06-2007, 01:34 PM
checkbox array - by El Forum - 09-06-2007, 03:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB