Re: Quickform group rules

From: Date: Fri, 13 Nov 2009 16:09:33 +0000
Subject: Re: Quickform group rules
References: 1 2 3 4 5 6  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-30144@lists.php.net to get a copy of this message
On Fri, Nov 13, 2009 at 06:42:47PM +0300, Alexey Borzov wrote: > Not yet, it's 0.3.0-alpha for a reason, you know... Yes & I know that producing the documentation takes as long as writing the code, I have done enough of that with some stuff that I have released GPL recently. > As for Array renderer, this is the direct port of Array renderer from > QuickForm 3.x, so you can review the examples, docs and templates for that: > ¿‰Ì›)[�ùûi > Òï‡http://pear.php.net/manual/en/package.html.html-quickform.html-quickform-renderer-array.php > > http://svn.php.net/viewvc/pear/packages/HTML_QuickForm/trunk/docs/renderers/templates/smarty-dynamic.tpl?revision=165897&view=markup > > http://svn.php.net/viewvc/pear/packages/HTML_QuickForm/trunk/docs/renderers/SmartyDynamic_example.php?revision=236645&view=markup > > The resultant array structure is a bit different, of course, since > QuickForm2 uses fieldsets rather than headers and allows unlimited > Container nesting. > > BTW, I'm not familiar with current Smarty, but if it understands Iterators > and can call (and chain) object methods, then maybe no renderer is needed > at all. I am writing an renderer for Smarty - I have taken the array renderer and am modifying/butchering/... it. I am aiming to product an array (which is what Smarty wants) that is compatible with current Smarty templates -- ie you are going to need to change the PHP, but hopefully will not have to change the templates. I will, of course, release it back to this list when it works: for comment/correction and, hopefully, inclusion into the main distribution. Yes: I will document it, probably something along the lines, and expanded, of my site which is the number 1 hit when I google ''smarty quickform example''. > E.g.: > {$form->getElementById('myElement')->__toString()} > > or: > {foreach from=$form item=element} > {$element->getLabel()} > {$element->__toString()} > {/foreach} That may be posssible -- although I am trying to avoid changes to *existing* smarty templates. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Past chairman of UKUUG: http://www.ukuug.org/ #include <std_disclaimer.h>

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