. */ /** * Defines the field */ require_once(FILESYSTEMROOTPATH."include/form/AbstractFormField.php"); class RadioField extends AbstractFormField { private $choices; private $separator; /** * Constructor */ public function __construct($name, $title, $choices, $separator="") { parent::__construct($name, $title); $this->choices = $choices; $this->separator = $separator; } public function getField() { $ret = ""; foreach( $this->choices as $key => $displayValue ) { $ret .= "name."\" id=\"". $this->name."_".$key."\" value=\"".$key."\"". ($key==$this->value?" checked":"")."".($this->class!=NULL?" class=\"".$this->class."\"":""). ($this->readonly?" disabled":"").">".$this->separator; } return $ret; } } ?>