1 <?php
3 class TemplateWidget_combobox extends TemplateWidget
4 {
5 function render()
6 {
7 $str = "";
9 // Build up list data
10 $str .= "<select size='1' name='{$this->postName}'>";
11 foreach($this->values as $name => $value){
12 if($name == $this->value){
13 $str .= "<option selected value=\"{$name}\">{$value}</option>\n";
14 }else{
15 $str .= "<option value=\"{$name}\">{$value}</option>\n";
16 }
17 }
18 $str .= "</select>";
19 return($str);
20 }
21 }
22 ?>