/** * Calls the success callback for the form, and saves the form value to the control's storage location * @param FormUI $form The form this control belongs to * @return boolean|string A string to replace the rendering of the form with, or false */ public function do_success($form) { $output = false; foreach ($this->on_success as $success) { $callback = array_shift($success); array_unshift($success, $this->get_form(), $this); if (!$form->get_setting('found_success', false)) { $result = Method::dispatch_array($callback, $success); if (is_string($result)) { $output = $result; } } } $this->save(); return $output; }