Welcome Guest, Not a member yet? Register   Sign In
Extending Form Validation
#3

[eluser]bretticus[/eluser]
It's actually pretty easy to create a callback that checks to see if at least one of the boxes has been checked.

It'd probably look something like...
Code:
function _got_check_boxen()
    {
        
        if ( $this->input->post('checkbox1')  === FALSE && ...) {
            $this->form_validation->set_message('_got_check_boxen', 'Must choose at least one');
            return FALSE;
        }        
    }


Messages In This Thread
Extending Form Validation - by El Forum - 09-20-2009, 12:49 PM
Extending Form Validation - by El Forum - 09-21-2009, 04:17 PM
Extending Form Validation - by El Forum - 09-21-2009, 05:24 PM
Extending Form Validation - by El Forum - 10-14-2009, 10:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB