Re: QuickForm_Controller
| From: | Bertrand Mansion | Date: | Mon, 08 Sep 2003 19:21:58 +0000 |
| Subject: | Re: QuickForm_Controller | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7652@lists.php.net to get a copy of this message | ||
<borz_off@cs.msu.su> wrote :
> Hi!
>
> Arnaud Limbourg wrote:
>>> Maybe we could add exportValue($page, $elementName) in complement to
>>> exportValues(). This would make it lighter to access the previously
>>> submitted values, instead of :
>>>
>>> $data =& $this->controller->container();
>>> $myValue = $data['values'][$page][$elementName];
>>>
>>> What do you think about that ?
>>
>>
>> Yes, it would be helpful imho. It would certainly make my code a tad bit
>> lighter ;)
>
> I didn't see a common need for such a function. Maybe I really overlooked
> something, can you describe the context where you need it?
Let's say you have a wizard like form for administrating promotional offers
on a commercial website. On the first page, you select the product you want
to set special prices for. On the second page, the form displays one row per
product selected, with a textfield for each products price.
In this configuration, the content of the second page depends on the content
of the first page. So you need an easy way to access the values submitted on
the first page.
Bertrand