Re: Formmail Question?

by Nik Gare <nik(at)cheddarcheese.de>

 Date:  Mon, 29 Jan 2001 12:41:55 +0100
 To:  <eagle(at)upstateguide.com>
 Cc:  hwg-techniques(at)hwg.org
 References:  lodz
  todo: View Thread, Original
In article <200101290845.JAA89323(at)ck-sg.p.lodz.pl>, Romek Zylla
<zylla(at)ck-sg.p.lodz.pl> wrote:
> At  13:57 1/28/2001 -0500,  Ellie Walsh  wrote:
> >Hi...
> >
> >I am currently using Matt's formmail on my website. It is a long form
> >to fill out - so when someone submits a form and they have an
> >error...... ie: they forgot to add their email address - they get an
> >error page and when they go back to the form..they have to fill in the
> >entire form again.

>   It is  browser specific baheviour.  In some browsers eg. Opera after
>   coming back (by  clicking back button) form is filled.

>   AFAIK  in netscape the form is cleared.

But it is still possible to display the data, directly from the server.  I
have no knowledge of Matt's FormMail nor perl, but presumably it is just
one scipt that does everything, ie diplays the forms for the user to type
the message into, and proceeses the data into an email which it then
sends.  What should (ie might ;-)) work, if the error page also displays a
new form to fill out, is if you search for all the form tags and then
alter them slightly so that it displays any relavent info which has
already been sent, ie:
the senders name part, just substitute the <? echo $name; ?> for the
relavent Perl command:

<input type="text" name="name" value="<? echo $name; ?>" size="32"
maxlength="32">

So, the first time the form is displayed, there will be no $name , and the
box will be empty.  With luck, when bad data is sent, the name box will
reappear with the $name inside it.
Or something vaguely similar,

Nik

-- 
<hr>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA