Quickform renderers

From: Date: Wed, 01 Oct 2003 11:39:19 +0000
Subject: Quickform renderers
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8176@lists.php.net to get a copy of this message
Hi, I'm trying to use quickform in my applications, but i'sm runing into problemes. I'm using a sort of templating with php vars and ---------------------------------------------------------------- Templating code ----------------------------------------------------------------
               include $FormPath;                extract($Content);
               ob_start();
               include $Path.$TemplateFile;
              $parsedTemplate = ob_get_contents();
               ob_end_clean();
---------------------------------------------------------------- Template: ---------------------------------------------------------------- <html> <head> <title>Form</title> </head> <body> <?=$Form;?> </body> </html> ---------------------------------------------------------------- When I use the quickform with the default renderer as in the docs: ---------------------------------------------------------------- File stored in $FormPath: ---------------------------------------------------------------- require_once 'HTML/QuickForm/Renderer/Default.php'; $renderer =& new HTML_QuickForm_Renderer_Default(); $form->accept($renderer); $Content[Form] = $renderer->toHtml(); ---------------------------------------------------------------- The form is not displayed on the right place in the html template where the form is specified. The correct ussage would be that de QuickForm rendered html is stored in the $Content[Form] array an by parsing the template the <?=$Form;?> var in the template is replaced by the rendered QuickForm HTML, but now the QuickForm html is displayed as soon as the file is inlcuded. So not stired in the $Content[Form] . Can anybody help me with this problem?

« previous php.pear.general (#8176) next »