Habari\FormUI::set_from_error_values PHP Method

set_from_error_values() public method

Set the values of the form controls from their session error values, if stored
    public function set_from_error_values()
    {
        // Put any error data back into the form
        if ($this->has_session_data() && isset($_SESSION['forms'][$this->control_id()]['error_data'])) {
            foreach ($_SESSION['forms'][$this->control_id()]['error_data'] as $key => $value) {
                $this->{$key}->value = $value;
            }
            unset($_SESSION['forms'][$this->control_id()]['error_data']);
        }
    }