Re: QuickForm Clear posted fields
| From: | Damien Cros | Date: | Tue, 07 Feb 2006 10:19:50 +0000 |
| Subject: | Re: QuickForm Clear posted fields | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22835@lists.php.net to get a copy of this message | ||
Isn't there a way to avoid the redirect?
I mean, it's easy to do it without quickform. Why would it be impossible to do it with quickform?
$myElement = $form->addElement(....
$form->addRule(...
if($form->validate())
{
// insert and then
$myElement->setValue('');
}
I think that will work but won't be clean if you have a lot of elements in your form.
Maybe something like
if($form->validate())
//insert
$form->clearValues();
woud be nice?
damien
Attachment: [application/pkcs7-signature] smime.p7s
Attachment: [application/pkcs7-signature] smime.p7s