public function __construct($id = "", $content = "") { parent::__construct(); // Set attributes $this->attr("value", $id); $this->content($content); }
public function __construct() { parent::__construct(); // Set attributes $this->attributes->method = "POST"; $this->attributes->action = ""; // Ensure that submitted values will be saved to the session under the current pageInstanceId $this->addSavePid(); // Check if form was submitted // TODO: make it work with multiple forms on the page $this->isSubmit = !empty($_POST); }
public function __construct($name = "", $label = "") { parent::__construct(); // Set attributes $this->attr("name", $name); $this->label($label); // Load the value from the Session if possible if (class_exists("PageInstanceId")) { $pageinstance = PageInstanceId::inst(); $vars = $pageinstance->getVarsForPageInstance(); if (isset($vars[$name])) { $this->val($vars[$name]); } } }