/** * * @return <type> */ public function get_value() { $value = parent::get_value(); if (!$value) { return $this->get_label(); } return $value; }
/** * * @return string */ public function my_props() { $props = parent::my_props(); if (($rows = $this->get_rows()) > 1) { // text area. $props['rows'] = $rows; unset($props['value']); } return $props; }
/** * * @return <type> */ public function props() { $out = parent::props(); unset($out['value']); if ($this->get_type() == self::CHOICE_CHECKBOX && is_array($this->data())) { $out['name'] = rtrim($out['name'], '[]') . '[]'; } return $out; }
/** * * @return string */ public function __toString() { $out = ''; if ($this->get_form()->get_label()) { $out .= $this->head(); } $out .= parent::__toString(); return $out; }