. */ /** * Defines the name.($this->multiple?"[]\" multiple=\"multiple\"":"\"").($this->size>0?" size=\"".$this->size."\"":"").($this->class!=NULL?" class=\"".$this->class."\"":"").">"; 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; } public function getInputValue() { if( isset($_POST[$this->name]) && $_POST[$this->name]!="NULL" ) { return $_POST[$this->name]; }else { return NULL; } } 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; } } } ?>