artist has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I have done this before many times, but I like to get a take on how it can be done better.

I have series of questions for a survey form and various options (combined) as answers such as radio, checkboxes, textbox etc. Form contains images as well. I have to prepare the form and as well as the CGI script which displays the thank you message and email the results. Questions and Answervalues can be put as q7 and q7a, q7b etc..as field names, which are translated back at the script. I like to have some uniform interface for the data also to generate the form as well as the script.

I Appreciate your help.

Thanks
artist.

Replies are listed 'Best First'.
Re: HTML Form and CGI script
by monsieur_champs (Curate) on Jun 16, 2003 at 17:33 UTC

    Hello, artist.

    hardburn's suggestion is quite interesting. Personally, I feel more confortable with a templating system. Please take a close look at HTML::Template and HTML::Mason. They should do the trick for you as good as WWW::Form. From now on, I think this is a personal taste question, you should look at the modules and try the one you feel more confortable with.

    Ah! Maybe Config::Simple could help you to organize the survey form a little, too.

    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Just Another Perl Monk

Re: HTML Form and CGI script
by hardburn (Abbot) on Jun 16, 2003 at 16:39 UTC

    Take a look at WWW::Form. My one gripe with it is that it doesn't integerage with a templating system very well. In my case, templating systems are always used unless it's really quick-and-dirty, but perhaps you don't care about that as much as I do.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    Note: All code is untested, unless otherwise stated

Re: HTML Form and CGI script
by PodMaster (Abbot) on Jun 17, 2003 at 06:54 UTC
Re: HTML Form and CGI script
by nite_man (Deacon) on Jun 17, 2003 at 06:45 UTC

    I use Embperl for building of web user interface to the application. We created a controls library, which includes text field, text area, password, radio button, button etc, and then just call those function with specified parameters. It's very useful and flexible.

          
    --------------------------------
    SV* sv_bless(SV* sv, HV* stash);