I apologize for not having enought time to research on this, I’m in a hurry but I need to travel back home now. I am hoping that someone will enlighten me while I’m on my way home.
I created a this public function:
public function getYesOrNo() {
$list[0] = 'No';
$list[1] = 'Yes';
return $list;
}
Your first approach is actually correct, as well as jacmoe’s. Maybe it has something to do with your database structure. Take a look at your Users table and see if it is set to a default value (I’m thinking it might be set to default ‘1’, thus making your dropdown to default ‘Yes’). If you want it to default to ‘Select’, it should be set to ‘default NULL’ or no default value at all.
Yeah, you’re actually correct. IsEmployee field is set to default to ‘1’, and after changing it to default ‘0’, dropdown defaults to ‘No’. I changed it to default NULL, and yes! Neither ‘Yes’ or ‘No’ was selected by default, but the ‘Select’.