Re: [PEPr] Comment on HTML::HTML_QuickForm_Renderer_Tableless
| From: | Mark Wiesemann | Date: | Fri, 16 Jun 2006 12:16:18 +0000 |
| Subject: | Re: [PEPr] Comment on HTML::HTML_QuickForm_Renderer_Tableless | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42983@lists.php.net to get a copy of this message | ||
Philippe Jausions wrote:
Very nice... If you release the DHTML tableless, I think I might just make it my default renderer for QuickForm.Nice to hear that. ;-)
One tricky question, how does the fieldset implementation handles multiple headers in one form...?I wasn't really aware of the fact that QF allow multiple header elements, therefore I've added no special handling for multiple headers. Currently it would be rendered like this (three header elements): http://www.markwiesemann.de/php/Tableless/contact.php Ideas for better handling of multiple headers are welcome. Another thing: Via PM I got another idea for this new renderer: The possibility to have multiple fieldsets. The suggestion was to add a method addFieldset() to the renderer that expects an array of element names. Maybe it would be better to extend QF itself with this such a method. This could then be combined in a new package ("HTML_QuickForm_Tableless") with three components: - Tableless renderer - DHTMLRules for those tableless forms (as in my example 2) - multiple fieldsets There would then be a class HTML_QuickForm_Tableless which extends HTML_QuickForm class and adds the following: - Tableless renderer as default renderer (which allows then to use $form->display() instead of the current code with $renderer = ...; $renderer->accept(); renderer->toHtml();) - addFieldset($name, $elements, $attrs) method $name would be for internal usage and $elements would be an array of element names. If one of them is a header element, it could be used as the legend of this new fieldset. All elements that don't belong to a fieldset that was added via addFieldset() will get into a default fieldset (as it is now). This extended QF class could also decline multiple header elements for a single fieldset (i.e. throw back an PEAR error), but maybe somebody of you has a good idea for handling of multiple headers. Comments on this are welcome, either here or via private mail! Thanks, Mark