public function valuesAsHtml($hideEmpty = false, $collection = null)
    {
        $strTable = "\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"validform\">\n";
        $strTableOutput = "";
        $collection = (!is_null($collection)) ? $collection : $this->__elements;

        foreach ($collection as $objPage) {
            if (get_class($objPage) === "ValidFormBuilder\\Page") {
                // If this page was rendered invisible due to conditions,
                // don't show it on the valuesAsHtml overview either.
                if (!$this->elementShouldDisplay($objPage)) {
                    continue; // Continue to the next page.
                }
                
                // Passing 'true' will return the optional 'short header' if available.
                $strHeader = $objPage->getShortHeader();

                $strTableOutput .= "<tr><td colspan=\"3\" class=\"vf__page-header\">{$strHeader}</td></tr>";
                foreach ($objPage->getFields() as $objFieldset) {
                    $strSet = "";
                    $strTableOutput .= parent::fieldsetAsHtml($objFieldset, $strSet, $hideEmpty);
                }
            }
        }

        if (! empty($strTableOutput)) {
            return $strTable . $strTableOutput . "</table>";
        } else {
            if (! empty($this->__novaluesmessage)) {
                return $strTable . "<tr><td colspan=\"3\">{$this->__novaluesmessage}</td></tr></table>";
            } else {
                return "";
            }
        }
    }