CodeIgniter Forums
callback function not working - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: callback function not working (/showthread.php?tid=9289)



callback function not working - El Forum - 06-20-2008

[eluser]Computerzworld[/eluser]
I have one combobox which is having select as default value and I have called one callback function for checking whether any value in the combo is selected or not. Here is the callback function which I have made.

Code:
function universitycombo_check($str)
    {
        if($str==0)
        {
            $this->validation->set_message('universitycombo_check', 'Please select any university');
            return FALSE;
        }
        else
        {
            return TRUE;
        }
    }

Now this function works only when I doesn't fill up any other form field than this combo. As soon as I fill up all the fields this validation doesn't works. I got stuck at this point. Please help me. Thank you.


callback function not working - El Forum - 06-20-2008

[eluser]Raiko[/eluser]
This is going to sound like an obvious question. Are you sure the value of the select box is coming out 0 every single time?