public function before_output_form() { // only run once if ($this->dummy_printed) { return; } // print dummy JS $this->print_dummy_javascript(); // set flags $this->load_scripts = true; $this->dummy_printed = true; }