toArray() behaviour (was: Re: [PEAR-DEV] Re: QuickForm 3.0 news: renderers)
| From: | Alexey Borzov | Date: | Thu, 13 Mar 2003 21:26:45 +0000 |
| Subject: | toArray() behaviour (was: Re: [PEAR-DEV] Re: QuickForm 3.0 news: renderers) | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-14275@lists.php.net to get a copy of this message | ||
Thomas Schulz wrote:
I just copied the behaviour of the old toArray() method, trying to break as little as possible. :] But I think that yours is a good idea. For currently if you do $form->addElement('radio', 'foo', ...); $form->addElement('text', 'bar', ...); $form->addElement('radio', 'foo', ...); then the radios will be grouped together in array, while they will be rendered with a text input between them using other renderers. Moving to numeric keys instead of element names in array will fix this situation indeed. Any more feedback from toArray() users?toArray() works through a new renderer as well, although its behaviour changed a bit: it does not return html for group elements, but rather an array of group elements' array representations. BTW, I need feedback from toArray() users: is this BC break OK with them or should I add a BC switch?For me it's OK, because I wait for these behavior to have a cleaner way to use toArray() with Smarty. Some feedback after I get the current CVS-version and look at the toArray()-output of QuickForm_example.php: The special handling of "non-grouped" radio buttons looks not good for me. How about numeric keys for all elements to avoid name conflicts?