[HTML/QuickForm] How can I override a textfield's value?
| From: | Schliwinski, Steffen | Date: | Wed, 03 Mar 2004 13:20:29 +0000 |
| Subject: | [HTML/QuickForm] How can I override a textfield's value? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-11070@lists.php.net to get a copy of this message | ||
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-