I want to ask
$state=$crud->getState();
if($state == 'edit')
{
$crud->required_fields('username','name','email');
}
if($state=='add')
{
$crud->required_fields('username','password','name','email');
}
as you can see there, I want to make 2 difference required fields
so, when add new user, the password is required but
when edit user, the password NOT required...
but when I using this code, for add and edit, the required code not working..
when I remove the state the required code is working..
so I'm assumming that the state code is not working..
or I wrong using the state code..
please.. any help?