Re: [HTML/QuickForm] How can I override a textfield's value?

From: Date: Wed, 03 Mar 2004 13:46:16 +0000
Subject: Re: [HTML/QuickForm] How can I override a textfield's value?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11075@lists.php.net to get a copy of this message
If I understand you well, when you do onChange, you want to clear the QF session variable. It should be possible with hidden fields, though probably convoluted. How about calling another PHP page that: - passes a variable = new selection - clears the QF session variable, - redirects to this same QF page - your QF page can show defaults based upon the variable passed Ignatius _________________________ "Steffen Schliwinski" <steffen.schliwinski@sap.com> wrote in message news:333D9700B499084C9DF804896DDA71780A3ACEB4@dewdfx14.wdf.sap.corp... > Hi, > > I have a ListBox containing some values (in my case some people's names): > > $form->addElement('select', 'name', 'Select Name: ', > $name_arr, array('onChange' => 'document.myForm.submit()')); > > As you can see the form is sent back to the webserver immediately when a value from the ListBox is selected. After that, I would like to show the entire dataset of the selected name underneath my ListBox, being able to edit and change the dataset's values in textfields. > When I call my page, I can only see the ListBox. I select a value and the form is extended showing me the entire info I want to see, that means the form's textfields contain the values from my selected dataset. That's fine. But now, when I select a different name from the ListBox, the textfields still contain the values from the previous dataset. That's logical, because the form always tries to display the values that were contained in the textfields when the form was sent. But how can I override these values? I have already spent hours on that. Please help. > > Kind regards, STEFFEN > -Germany-

« previous php.pear.general (#11075) next »