I would appreciate some help or pointers for the following CGI / Perl /
MS-FrontPage 2000 form validation problem:

I am writing an autoresponder which generates two e-mails: one to me, and a
confirmation back to the sender. I have a form on an MS-FrontPage web page
which collects initial user input. I want to send the input via CGI to a
Perl script for validation. If the data are NG, cycle it back to the user
who will be allowed to edit and resubmit it; if the data are OK, send it off
for processing.

The data are fairly simple: name, user's e-mail address, topic area, subject
line, and message body.

Being a newbie, I've stepped into this fairly carefully, teaching myself
Perl and CGI step by step, gradually adding functionality to the script so
that now the form sends the data to the Perl script, the script generates
the required two e-mails, and the e-mails are sent off as intended. My test
setup works well, and so far, I'm a happy camper.

Now, I'm adding the validation portion of the process -- I've been a
programmer for far too long to know that I never trust user input until
checked. I've created an imperfect copy of my web page which I use to echo
back to the user the original values if the data fails validation. I'll
cycle this until I'm happy with what they've submitted before allowing their
e-mail to proceed or give up on 'em and post a really rude message to their
browser (suggestions in that area are appreciated, BTW <g>).

I've discovered how to echo back to the user their entered 'name', 'e-mail
address', 'topic area', and 'subject' data. What I have trouble with is the
'message body' data. I'm using a <TextArea> HTML tag in the form and it
doesn't seem to be happy accepting variables as does the <Input> tag, of
course. I can't do a value="$message_body", for example, within the
<TextArea> tag. (Or, if I *can*, it doesn't seem to work for me...harumph!)

So, my first question is: how do I display, or echo back, the user's e-mail
message body so that they have the opportunity to edit it before sending it,
in this context?

Secondly, does anyone know of the 'proper' way to have a CGI / Perl lashup
talk back to a FrontPage form to allow for Perl-based, extensive data
validation (as opposed to the anemic 'validation' abilities that FrontPage
forms have)?

Thirdly, and slightly off-topic for this list, -- remember my "...imperfect
copy of my web page" -- how do I include FrontPage's background themes and
navigation features for my copy of the form page. I'd like the validation
'response' page to look just like the original calling page and to have the
user return to a calling page on the site, if possible.

And finally, am I actually headed in the right direction with all of this?
Yup, I know, "TMTOWTDI" -- that's what makes it fun, of course, but I'm in
the learning stage, so I need to know at least one or two decent ways to do
it, first, before I try variations on a theme.

I'm looking for methods, procedures, code samples, snippets, or whatever, to
guide me through this process -- simple English-based explanations wouldn't
hurt, either. <g>

Thank you, all.


John--
[EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to