feha
Posts: 712
|
Posted: 02/01/2006, 8:52 AM |
|
I had a problem with presenting 4-5 values in to Label inserted via radiobuttons ListOfValues ...
As I had use only once for this i was to lazzy to create table (SQL) and insert values etc ..
function find_ListOfValues($ListOfValues, $compare="3")
{
// by www.vision.to
while(list($key,$value)=each($ListOfValues))
{
if($key == $compare)
return $value;
}
}
$ListOfValues=array(
"1" => "Left",
"2" => "Right",
"3" => "Top",
"4" => "Bottom",
"" => "n/a"
);
//echo find_ListOfValues($ListOfValues, $compare="3")
the line echo needs to be replaced with form component->field->SetValue(find_ListOfValues($ListOfValues, component->field->GetValue()) ) ...
_________________
Regards
feha
www.vision.to
feedpixel.com |