Re: QuickForm Clear posted fields
| From: | Justin Patrin | Date: | Mon, 06 Feb 2006 18:02:01 +0000 |
| Subject: | Re: QuickForm Clear posted fields | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22830@lists.php.net to get a copy of this message | ||
On 2/6/06, cwhisperer <cwhisperer@vo.lu> wrote:
> It is the same php script that shows the form and insert resp. update
> the data...
>
> I guess I have to do something in
> if($form->validate()){
> //insert resp. update
>
> //clear the posted fields
> }//endif
>
> but, how...?
>
Don't. Just redirect back to itself.
header('Location: '.$_SERVER['REQUEST_URI']);
or similar.
>
> Justin Patrin wrote:
> > On 2/6/06, cwhisperer <cwhisperer@vo.lu> wrote:
> >> Hi,
> >>
> >>
> >> After having submitted a form, I want to clear the values entered in the
> >> form. How do I do that?
> >>
> >
> > I suggest redirecting back to the form.
> >
> > --
> > Justin Patrin
> >
>
--
Justin Patrin