RE: [PEAR] QuickForm Question
| From: | Mike Carter | Date: | Tue, 28 Oct 2003 15:07:51 +0000 |
| Subject: | RE: [PEAR] QuickForm Question | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-8650@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: James 'Chip' Kaufman [mailto:jkaufman@wamnetgov.com]
>
> I thought I would try rephrasing my question in hopes that
> someone can
> point me to the code bit that is causing my problem.
>
> This is how it looks to me. I have two independent pages of an
> application. Each instantiates a QuickForm object. Page 1
> creates three
> text elements, "element1", "element2", and "element3". These get
> submitted to Page 2 using the POST method.
>
> On page two, I create two PHP variables - one is $element1, the other
> $element2. They may or may not have the same values as the variables
> from Page 1. I instantiate a form and set default values for
> 'element1'
> and 'element2' to $element1 and $element2, respectively.
>
> However, when I display the form I see the submitted values,
> rather than
> the ones that I set as defaults.
>
> Why is this happening? Where in the code does Quickform give
> preference
> to submitted data over explicitly set default data?
You can use the setConstants() method to force values in to the 2nd page
form.
Maybe that will help.
- mike
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________