Welcome Guest, Not a member yet? Register   Sign In
validation isn't working right
#11

[eluser]Dyllon[/eluser]
Code:
echo form_dropdown('sday', $sday, date('j') );
#12

[eluser]dadamssg[/eluser]
well i want to use set_value or set_select so the form will remember their input if it comes back with an error
#13

[eluser]Dyllon[/eluser]
Code:
echo form_dropdown('sday', $sday, set_value('sday', date('j') ) );
#14

[eluser]dadamssg[/eluser]
doesn't work..tried that already. I think it has to be set_select and it uses TRUE to set the value which doesn't work with my numeric date('j')
#15

[eluser]Dyllon[/eluser]
Works for me, is your dropdown contained in a form?
#16

[eluser]dadamssg[/eluser]
doesn't work for me and yes its contained in a form
#17

[eluser]dadamssg[/eluser]
it won't seem to forget the initial value and remember the new one thats inputted
#18

[eluser]Dinesh Shah[/eluser]
Banging my head and searching and reading this forum for last few hours.

form_validation refuses to work with callback. :-( PLEASE HELP!

Here is my code. CI simply does not call my callback.

Code:
$this->form_validation->set_rules('group', 'Group Name', 'trim|required|alpha|callback__group_exist[group]');

    function _group_exist($values, $group)
    {
        $groups    = $this->read_group_file();
        print_r($grpups);
        echo $values ;
        echo "<br / ><br />";
        echo $group . "<br / ><br />";
        if ( isset($groups[$str]) )
        {
            $this->form_validation->set_message('group_exist', 'The group %s already exists');
            return FALSE; // This is deliberate to see if the callback happens
        }
        return FALSE; // This is deliberate to see if the callback happens
    }




Theme © iAndrew 2016 - Forum software by © MyBB