QuickForm - update default values form
| From: | Martijn Sanderse | Date: | Tue, 27 May 2003 23:15:55 +0000 |
| Subject: | QuickForm - update default values form | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-5641@lists.php.net to get a copy of this message | ||
Hi,
So far i was really happy with QuickForm, but now I got a little problem:
I have a form containing empty fields. When I fill in one field and press
the search button, I'd like the resulting query-data put back in the same
form. So afterwards data can be edited and submitted with another button.
However I can get setDefaults setting defaults the first time, but after
validating it doesn't put the queried data in the form.
Is it possible using Quick_Forms? Or am I doing somthing totally wrong here?
End of the form:
if($form->validate()){
$newDefaults = search($submittedValues);
$form->setDefaults($newDefaults);
}
$form->display();