Re: QuickForm : clear a form
| From: | Julien Tschäppät | Date: | Wed, 03 Aug 2005 20:32:12 +0000 |
| Subject: | Re: QuickForm : clear a form | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20248@lists.php.net to get a copy of this message | ||
2005/8/3, Justin Patrin <papercrane@gmail.com>:
> On 8/3/05, Julien Tschäppät <julien35@gmail.com> wrote:
> > Hi,
> >
> > Is it possible to clear a form ? I want to empty the fields
> > automatically when the form is sent.
>
> When exactly do you mean? If you mean that you're processing the form
> and the displaying it again you can do various things...the least
> problematic of which would be to redirect to the same page again
> without the posted values.
>
> --
> Justin Patrin
>
I have something like that :
$form = new HTML_QuickForm('myForm', 'post');
$form->addElement(...
...
...
...
if($form->validate()) {
$form->process('processAdd', false);
}
$form->display();
If the form is processed, I want to reset the form. How can I remove
the posted values ?