Re: ::HTML_QuickForm_Controller->exportValues()
| From: | Bertrand Mansion | Date: | Wed, 01 Oct 2003 10:54:40 +0000 |
| Subject: | Re: ::HTML_QuickForm_Controller->exportValues() | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22259@lists.php.net to get a copy of this message | ||
<marba126@student.liu.se> wrote :
> 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.
Hi Markus,
You can actually go the other way round, as exportValues() accepts a
pageName parameter.
About the background, you have to consider that a multipage form is still
only one form. Thus, it's important to have unique element names in the end..
It's much easier to use the Controller this way.
Bertrand Mansion
Mamasam