Re: QuickForm_Controller with SMARTY
| From: | Sylvain Gourvil | Date: | Tue, 05 Jul 2005 12:27:47 +0000 |
| Subject: | Re: QuickForm_Controller with SMARTY | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19870@lists.php.net to get a copy of this message | ||
Peter Jasovsky wrote:
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-- I do use QuickForm and Smarty but because of development & human issues, i do not use the smarty stuff. I include the php file via smarty directly in order to have the form in one particular php file. It will easier to modify but it is not the best programming way. Could you send me your example if you manage it ? Thanks a lot Sylvain Gourvil --------------------- Sylvain Gourvil Développeur PHP5, PEAR, SMARTY, POSTGRESQL Antiquités en France