. */ /** * Defines the field */ require_once(FILESYSTEMROOTPATH."include/form/AbstractFormField.php"); class CheckboxField extends AbstractFormField { /** * Constructor */ public function __construct($name, $title) { parent::__construct($name, $title); } public function getField( $i = NULL ) { if( is_numeric( $i ) ) { return "name."[]\" value=\"".$this->title[ $i ]."\"".($this->class!=NULL?" class=\"".$this->class."\"":"").($this->readonly?" readonly":"").($this->value?" checked":"").">"; }else{ return "name."\" value=\"".$this->title."\"".($this->class!=NULL?" class=\"".$this->class."\"":"").($this->readonly?" readonly":"").($this->value?" checked":"").">"; } } public function setChecked($checked) { $this->checked = $checked; return $this; } } ?>