The proposal: http://framework.zend.com/wiki/pages/viewpage.action?pageId=3596
There's a useful discussion going on here, more useful than the proposal itself. Among some rather less useful comments (like form validation rules belonging to the View of MVC; judging the quality of the form library on the basis of how far its API is from QuickForm) there are some very good ideas.
If you mean my rants by this, then know that I'm not judging the quality of the proposal or even of the QuickForm. What I originaly meant was that QuickForm is mixing controller parts and views (like defining element attributes directly in PHP “controller” code, for instance) and the Zend proposal was already heading the same way (and it was very awkward for me to use QF with XML/XSLT as a template system because of this). That's where the “still too close to QF's model” comment came from. I find the QF a really good predecessor and to this date I haven't found any better alternative. But it has some flaws that bug me. That's all. – Michael Minicki
One idea is wrapping the form object around the existing form. Let's say we have a file kewl-form.html designed by a web designer. Now we can easily parse it (assuming XHTML) and build two files
kewl-form-model.phpkewl-form-output.phpThe former will just have a long list of
$form->addElement(...);
calls based on actual form elements found in kewl-form.html. The latter will have something along the lines of
<div class="element"><?php echo $form->getElementById('foo')->toHtml(); ?></div>
. Something similar to what QuickHTML renderer does now, but on steroids.
The developer then needs to add validation rules and the like to the auto-generated elements, the designer is free to mangle the presentation in any way he likes. The difference to current template-based approach is that it is possible to hack elements' attributes also and that the form contains actual elements rather than placeholders: much easier for the designer.
That's already the idea behind builders. It is not borrowed from Zend, but from Python's Form_Encode module.
Well, I din't get the builders idea fully, then.
BTW, can you also list the form-generation libraries from other languages on this page?
The site seems quite a bit broken at the moment, working links:
Needs to be reviewed.
Solar framework also has some form classes, here is a blog post from Paul M. Jones about it containing some QuickForm citicism as well: http://paul-m-jones.com/blog/?p=117
Very extensive 5000-line object-orientated form class written at the University of Cambridge, under active development. GPL. No errors with error_reporting 2047.
Supports: