public function __toString() { $html = trim(parent::__toString()); if (!$this->readonly) { $html .= $this->value() . '</' . $this->tag_name . '>'; } return $html; }
/** * Convert form field to an HTML string. */ public function __toString() { $v = $this->value(); if (empty($v)) { // empty value means it's not signed off. temporarily override // the value so it shows up in the submit button. $this->value = 'Signoff'; $html = parent::__toString(); $this->value = null; } else { return $this->readonly($v); } return $html; }