Re: quick_form but with more control over table structure?
| From: | Ray Still | Date: | Sat, 22 Jan 2005 21:16:27 +0000 |
| Subject: | Re: quick_form but with more control over table structure? | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17108@lists.php.net to get a copy of this message | ||
----- Original Message ----- From: "Justin Patrin" <papercrane@gmail.com>
To: "Ray Still" <rstill74@hotmail.com>
Cc: <pear-general@lists.php.net>
Sent: Saturday, January 22, 2005 12:01 PM
Subject: Re: [PEAR] quick_form but with more control over table structure?
On Sat, 22 Jan 2005 09:33:26 -0700, Ray Still <rstill74@hotmail.com> wrote:RayHi, Ray Still wrote:The docs [1] say: "Note: This function can not be called statically." You should create an instance of the renderer and then work with that.Thanks to help received from the list, I've found out what templates are. I think that what I want to do is just turn off templates in the renderer. The code I've found in the manuals says that I have to: require_once "HTML/QuickForm/Renderer/Default.php"; and then, later on: HTML_QuickForm_Renderer_Default::clearAllTemplates();[1] http://pear.php.net/manual/en/package.html.html-quickform.html-quickform-renderer-default.clearalltemplates.php -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php(return value is void, as is the parameter list, by definition) this gives the following error: PHP Fatal error: Using $this when not in object context in C:\php\PEAR\PEAR\HTML\QuickForm\Renderer\Default.php on line 465Hello, Yes; I've read that page (http://pear.php.net/manual/en/package.html.html-quickform.html-quickform-renderer-default.clearalltemplates.php) many times, but I'm not sure how to do it right. I'm new to this, and I haven't got used to how it all works. As well, most of the tutorials I can find on the web appear to be prior to version 3.2, when apperently this feature changed. Any help appreciated Ray can somebody point me in the right dirrection.require_once "HTML/QuickForm/Renderer/Default.php"; $renderer = new HTML_QuickForm_Renderer_Default(); $renderer->clearAllTemplates(); $form->accept($renderer); echo $renderer->toHTML(); But this isn't going to be what you want. Try using the Array or ArraySmarty renderer and Smarty. The above is not a template, it's a renderer which uses element templates. The template systems we mean are Flexy and Smarty. -- Justin Patrin -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Thank you very much, this is exactly what I'm looking for. It may not be the most efficient way, but it lets me have the advantages of quick form I'm looking for, and it lets me explicitly specify the table structure using addElement('html',....)