Gossamer Forum
Home : General : Perl Programming :

Form with Check box Question

Quote Reply
Form with Check box Question
Hi all, I am in need of some perl advice. I have been approached by my boss at work and told to design a webpage for him.
HTML and JAVA I am fine with, unfortunately Perl I am not.
Basically, what is required is a html page with around 10 check boxes, this I can do.
I require these to be placed in a Post from tag.
When a visitor clicks on one or more check boxes and presses proceed, another html page will appear, saying thank you, you have shown an interest in blaa,blaaa (whatever check boxe he has ticked.

Then I require a form, where the user then adds name and address and when clicks proceed, I get an email saying joe bloggs is interested in blaa,blaa and joe blogs also gets an email saying thanx for the request you will be receiving an email very shortly bla bla.. The user is then taken to a thank you page...

Is this easy to do. Does anyone know of a cgi script that already exists, my knowledge of Perl is very very poor.

Would it take long to write the cgi script, could someone point me in the right direction, or to a web site where i can see an example you i can modify or learn the scripting.

I recently bought Perl 5.0 complete, but I am struggling

Any help would be much appreciated...

Quote Reply
Re: Form with Check box Question In reply to
In Reply To:
I recently bought Perl 5.0 complete, but I am struggling
????

If you're just after a simple two page form like you mentioned -- maybe PHP would give you less headaches. Try http://www.php.net.

Although some might disagree, PHP is much easier to use just to pass variables between pages. Maybe not as easy to write or as secure as perl to write perl sub routines, however.

Rgds
Wil Stephens

Quote Reply
Re: Form with Check box Question In reply to
I'd say for a simple form, either language will do a good job.

There are tons of form processors about but maybe not one that does exactly what you want. You would probably need to end up modifying it.

Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

Quote Reply
Re: Form with Check box Question In reply to
Thanx for the replies. Unfortunately< I have spent ages searching websites, cgi-resources, cgi archives etc etc.

Yes, I agree these sites have form processors by the hundreds. But unfortunately they are all Name, address fields etc, not check boxes.

The orignal site can be seen here
http://www.hofman.co.uk/responce.htm

This script we have here sort of works, when you click on the check boxes, then fill the form out below, an email is sent too you and also to me, you are then taken to a thank you page.

What we require is:-
the check boxes on one page, then click to continue.
the new page will display what you have click and the contact form for emailing, which once complete emails you and me and then redirects to a thank you html page.

Can anyone point me the right direction here, I am at my last end and have really no where else to turn.

A big Thank you
Please someone

Quote Reply
Re: Form with Check box Question In reply to
1) Learn about sendmail/smtp processes in Perl. You'll have to first identify whether you have sendmail installed in your server or if you can use a SMTP relay server for your send email codes in the script.

2) Learn about conditional statements based on user inputted parameters.

3) Learn about subroutine calls.

4) Learn about form parsing codes.

5) If you don't want to learn any of the above and looking for an "out-of-box" solution (which you probably won't find since you'll have to hack or modify about any third party software script out there), search for the script at the following web sites:

http://www.hotscripts.com
http://www.perlarchive.com

Good luck.....

BTW: Since you are using LINKS 2.0, it would be quite easy to use the Mailer.pm module and other centralized library files in LINKS 2.0 to do what you want.

Regards,

Eliot Lee
Quote Reply
Re: Form with Check box Question In reply to
Eliot, thank you very much, thats the kick off (head start) that I needed,
(1) I never thought of using links 2.9 email module
(2) I have been too the 2 site mention above plus more, they have standard form processors etc etc,
(3) Hacking the script, well I truthfully thought it would come to this but oh well.

You see the thing is I have two scripts, one that does the check boxes and the other is a standard form mailer, trying too add them together and get them working is the problem,.

But the info you have provided above as help me out heaps, thank you very much for your reply,

Keep up the good work.

Much appreciated