예제 #1
0
 /**
  * Overload render method
  */
 public function render()
 {
     if ($this->multiple) {
         $this->setAttrs(array('multiple' => '', 'size' => $this->multiple));
     }
     return parent::render();
 }
예제 #2
0
 /**
  * Overload render method
  */
 public function render()
 {
     $html = "";
     $default = $this->value;
     foreach ((array) $this->options as $v => $t) {
         if ($v) {
             // value can not be empty
             $this->setAttrs(array('value' => (string) $v, 'checked' => null));
             if (!strcmp($v, $default)) {
                 $this->setAttrs(array('checked' => ''));
             }
             $html .= parent::render() . " {$t} ";
         }
     }
     return $html;
 }