1
I am trying to add additional information to the XoopsFormSelect. I am trying to add information to the value to colour each drop down element. Here is my code.
class GAFormSelecttee_names extends XoopsFormSelect {
function GAFormSelecttee_names($caption, $name, $value=null, size=1, $nullopt=false, $otheropt=false) {
$db =& Database::getInstance();
$this->XoopsFormSelect($caption, $name, $value, $size);
if ($nullopt)
$this->addOption('','-');
$sql = "SELECT tee_name_id, name, fgcolour, bgcolour FROM ".$db->prefix("ga_tee_names")." ORDER BY name";
$result = $db->query($sql);
while ($myrow = $db->fetchArray($result)) {
$this->addOption($myrow['tee_name_id'].'" style="background-color:'.$myrow['bgcolour'].';color:'.$myrow['fgcolour'].';',$myrow['name']);
}
}
}
The problem is that my " get converted to the HTML equiv of "
Anyway I can prevent this?