QuickForm Controller with SMARTY

From: Date: Tue, 05 Jul 2005 09:59:42 +0000
Subject: QuickForm Controller with SMARTY
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-38446@lists.php.net to get a copy of this message
Hi there, I'm trying to add QuickForm_Controller to our new project and a new problem has occured while trying to tie it with SMARTY. I found only one example via Google, and it doesn't seem to work right. The example is extending HTML_QuickForm_Action_Display class with MyDisplay class where he's trying to assing ana object which is empty in my opinion: # assign array with form data $tpl->assign('form', $renderer->toArray()); Before that, only $renderer =& new HTML_QuickForm_Renderer_ArraySmarty($tpl); is set, but I can't see filling of $renderer. Am I suppose to add something like: $page->accept($renderer); ?? Other thing is, templates. Defining is fine: define ('TEMPLATE_PAGE1', 't1.html'); define ('TEMPLATE_PAGE2', 't2.html'); define ('TEMPLATE_PAGE3', 't3.html'); But using it: $tpl->display(TEMPLATE_DIR . TEMPLATE_PAGE1); IMHO, this only shows the first template file. How to display another after clicking on "NEXT" button? Can you please provide me with some example of how to use it with smarty? I'd really appriciate your help, i can't manage it by myself. Thank you very much, Peter Jasovsky

« previous php.pear.dev (#38446) next »