public function getFormData($groupErrors = true)
    {
        if (!self::$registered) {
            HTML_QuickForm2_Renderer::register('smarty', 'HTML_QuickForm2_Renderer_Smarty');
            self::$registered = true;
        }

        // Create the renderer object
        $renderer = HTML_QuickForm2_Renderer::factory('smarty');
        $renderer->setOption('group_errors', $groupErrors);

        // build the HTML for the form
        $this->render($renderer);

        return $renderer->toArray();
    }