Re: Quickform group rules

From: Date: Fri, 13 Nov 2009 15:42:47 +0000
Subject: Re: Quickform group rules
References: 1 2 3 4 5  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-30143@lists.php.net to get a copy of this message
Hi Alain, Alain Williams wrote:
Consider using HTML_QuickForm2 instead, especially if you want to get rid of E_STRICT error messages. It *will* detect such things and won't add one
I am using smarty - I can't see the smarty renderer. It might be simpler to port that to PHP5 & QF2.
OK: I ported php 5.3 to CentOS and am puzzling on how to use QF2 with the array renderer. I looked at the ArrayTest.php - and have got something out of it that I could start to pick to bits, but that is just by seeing what is in there and guessing -- not by *knowing* what should be in there and using it. It is there any decent documentation about this ?
Not yet, it's 0.3.0-alpha for a reason, you know... 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: 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. E.g.: {$form->getElementById('myElement')->__toString()} or: {foreach from=$form item=element} {$element->getLabel()} {$element->__toString()} {/foreach}
Ideally the documentation should be written by the authors since they know what the *intention* of everything is.
This is a good excuse for not helping to write docs, I'll use it from this time on. :]
I have found this: http://quickform.mamasam.com/wiki/doku.php but it still doesn't really fit the bill.
That's mostly for planning and discussing implementation, yes. But we won't object if someone starts sketching docs there.

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