. */ /** * Defines the name.($this->multiple?"[]\" multiple=\"multiple\"":"\"").($this->size>0?" size=\"".$this->size."\"":"").($this->class!=NULL?" class=\"".$this->class."\"":"").($this->readonly?" disabled":"").">"; if( $this->value==NULL && !$this->multiple ) $ret .= ""; if( $this->useOptgroup ) { foreach( $this->choices as $optgroup => $groupValues ) { $ret .= ""; foreach( $groupValues as $key => $displayValue ) { $ret .= ""; } $ret .= ""; } }else { foreach( $this->choices as $key => $displayValue ) { $ret .= ""; } } $ret .= ""; return $ret; } private function isSelected($key) { if( $this->value!=NULL && is_array($this->value) ) { return in_array($key, $this->value); }elseif( $this->value!=NULL && !is_array($this->value) ) { return $key==$this->value; }else { return false; } } }