I have this database driven Combo Lookup:
//START COMBO
$sql = "select * from CourseType where hidden='No' order by name";
$active = db_select_query($sql);
unset($combolist);
foreach ($active as $recordvalue) {
$combolist[] = array($recordvalue['coursetypeid'] => $recordvalue['name']);
};
$xcrud->change_type('coursetype','select','', $combolist);
//END COMBO
The problem I have is the output is:
0
Value
1
Value
2
VAlue
etc
Where
VALUE is correct and the correct value is recorded
0,1,2 Is read only/disabled and I have no idea where this comes from or how to get rid of it!
(image attached)
Any ideas on how to remove this index?
//START COMBO
$sql = "select * from CourseType where hidden='No' order by name";
$active = db_select_query($sql);
unset($combolist);
foreach ($active as $recordvalue) {
$combolist[] = array($recordvalue['coursetypeid'] => $recordvalue['name']);
};
$xcrud->change_type('coursetype','select','', $combolist);
//END COMBO
The problem I have is the output is:
0
Value
1
Value
2
VAlue
etc
Where
VALUE is correct and the correct value is recorded
0,1,2 Is read only/disabled and I have no idea where this comes from or how to get rid of it!
(image attached)
Any ideas on how to remove this index?