Welcome Guest, Not a member yet? Register   Sign In
callback on checkbox not working
#2

[eluser]faxtion[/eluser]
[quote author="CIfan1000" date="1223860679"]

Code:
// ----------------------------------------------------------------------------
        // Define callback function used in validation above:
       function CheckboxUserAgreement_validate($str)
           {
                // Check if the CheckboxUserAgreement is checked:
                if (isset ($_POST ["CheckboxUserAgreement"]))
                    {
                        echo "true";
                         return TRUE;
                    }
                else
                    {
                     $this->validation->set_message('CheckboxUserAgreement_validate', 'You must agree to the User Agreement');
                     return FALSE;
                    }

            // End of CheckboxUserAgreement_validate function
            }

Might be a long shot but have you tried the following:

Code:
if ($_POST ["CheckboxUserAgreement"] == '0')
        {
                     $this->validation->set_message('CheckboxUserAgreement_validate', 'You must agree to the User Agreement');
                     return FALSE;
        }
        else
        {
            return TRUE;
        }


Messages In This Thread
callback on checkbox not working - by El Forum - 10-12-2008, 02:17 PM
callback on checkbox not working - by El Forum - 10-12-2008, 02:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB