Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Trying to add checkboxes to a survey form

by smashypie (Initiate)
on Feb 22, 2003 at 05:11 UTC ( [id://237670]=perlquestion: print w/replies, xml ) Need Help??

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

Hey -

I am only an HTML programmer so I know nothing about CGI/PERL. However, I decided to use free "survey form" script from http://www.bignosebird.com/carchive/survey.shtml to create a form.

I am trying to get checkboxes into the survey. I don't know what i have to put into the CGI or SRV file. I already have this as one of my checkboxes in the HTML:

<INPUT TYPE="checkbox" NAME="ITEM_7" VALUE="ITEM_7|Yes" >Ability to +find money for college via almost a million scholarships plus financi +al aid tips
How do I get the checkboxes be included into the survey when they are checked from being in an 'unchecked' state.

Also, how would I get "email" and "comments" to appear below all the percentage information. I am so new to this so who ever could help me would have to tell me where to put what in between exactly what.

Thanks for your help

Replies are listed 'Best First'.
Re: Trying to add checkboxes to a survey form
by integral (Hermit) on Feb 22, 2003 at 08:24 UTC
    Well, if you're looking for information perl cgi programming, you should look at the CGI module, which as well as providing functions for handling the cgi environment, also has functions for generating html, including form elements like checkboxes.

    --
    integral, resident of freenode's #perl
    

      If you look at the code that he is starting with, it doesn't use CGI module so he won't be able to garner help from the CGI listing in CPAN.

        I realise that, but I will still just trying to offer some perl programming advice, so whilst his question has 'Spammer?' against it and isn't strictly perl related, I was just trying to demonstrate one way of constructing such a survey in perl, if the OP should ever wish to develop one himself.

        --
        integral, resident of freenode's #perl
        
Re: Trying to add checkboxes to a survey form
by basm101 (Acolyte) on Feb 22, 2003 at 14:45 UTC
    A simple checkbox form using cgi.pm would look something like this:
    <FORM METHOD="post" ACTION="path to your cgi directory/cgi-bin/form.cg +i"> <TD><INPUT TYPE="TEXT" NAME="querybox" SIZE="50"></TD> <TD><INPUT TYPE="SUBMIT"></TABLE> <TABLE CELLPADDING=7> <TR><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD> <TD><INPUT TYPE="checkbox" name="box1">box1</TD> <TD><INPUT TYPE="checkbox" name="box2">box2</TD> </TABLE> </FORM>
    remember to use:CGI and use CGI::Carp qw(fatalsToBrowser) is
    very useful

    basm101
Re: Trying to add checkboxes to a survey form
by logan (Curate) on Feb 23, 2003 at 22:19 UTC
    There has been much discussion of your request, and I must admit I'm a little suspicious. What, exactly are you planning on using this for? You're asking for information about applying to colleges, but you're using the live site of an antiques dealer to develop your code. If you are a professional web developer, you should already know how unprofessional that is. Plus, the content of the form gives me an uncomfortable feeling about how the data will be used. Before I help you, I want to know more about the project. the last thing I want to do is help someone clog up the net with more spam.

    -Logan
    "What do I want? I'm an American. I want more."

Re: Trying to add checkboxes to a survey form
by Anonymous Monk on Feb 22, 2003 at 19:31 UTC
    I don't know anything about PERL programming. IF you go to: http://www.longvalleyantiques.com/survey/survey.html - you can see what I am trying to do. If you notice, the drop-down state and the checkboxes come up as 0% when you see the results page. Here are the codes:
      okay - that didn't work well. Maybe I should email whoever is interested in this case the code...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://237670]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-25 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found