/** * Save form for validation * @param boolean $replace set false if you have multiple forms on one page * @param boolean $prepare prepare session, false on unittesting */ public function save($replace = true, $prepare = true) { $this->add(new \bootbuilder\Controls\Hidden("bootbuilder-form", $this->id)); if ($replace) { \bootbuilder\Validation\Validator::clean(); } \bootbuilder\Validation\Validator::save($this, $this->id, $prepare); }