Re: ::HTML_QuickForm_Controller->exportValues()
| From: | Markus | Date: | Wed, 01 Oct 2003 09:35:39 +0000 |
| Subject: | Re: ::HTML_QuickForm_Controller->exportValues() | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22256@lists.php.net to get a copy of this message | ||
It's basically a matter of personal taste of course. I just had a diffrent
idea about the "approach" when I got into this. Now, when you've told me
about it, there is an explanation for other things too. E.g. I suppose the
reason for the lack of a "page name"-parameter for method
setDefaults($defaultValues) in class HTML_QuickForm_Controller has to do
with this too.
I might very well be missing some crucial background information/discussion
that motivates merging the information from sveral pages. It would be very
interesting to get that information. Or is there something about this in the
manual that I've missed ?
Why is it much simpler to process it in the current way? Talking about
exportValues(), it is very easy for the user to merge an
array('page_name'=>array('element_name' => 'element_value')) to
an
array('element_name' => 'element_value') if he/she wants to.
All the best,
Markus
"Arnaud Limbourg" <arnaud.limbourg.prestataire@cegetel.fr> skrev i
meddelandet news:3F7A79C0.3040407@cegetel.fr...
> >> *Problem*
> >> If you use the HTML_QuickForm_Controller package to build a
> >> multipage-form
> >> and want two elements with the same name on two different pages, then
the
> >> exportValues() method in class HTML_QuickForm_Controller will only be
> >> able
> >> to return an array with one of the values. This is because the array
> >> returned is composed like:
> >> array('element_name' => 'element_value')
> >
> >
> > exportValues() was designed to work this way to make the multi-page
> > Controller look like a single-page QuickForm. Thus no desire to "fix"
> > this behaviour. :]
>
> I agree with alexey here. It is much simpler to process this way.
>
> Plus, i don't see why two elements would have the same name, making a
> difference between the two just because they live on a different page
> might not be a good idea.
>
> Arnaud.