Exemplo n.º 1
0
Arquivo: form.php Projeto: azuya/Wi3
 public function addSavePid($pageinstanceid = null)
 {
     // Add a hidden field with the pageInstanceId
     $pid = new Html_Input("savepid");
     $pid->attr("type", "hidden");
     if ($pageinstanceid == null) {
         $pageinstance = PageInstanceId::inst();
         $pageinstanceid = $pageinstance->pageinstanceid;
     }
     $pid->val($pageinstanceid);
     $this->add($pid);
 }
Exemplo n.º 2
0
 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]);
         }
     }
 }