in reply to Trying to add checkboxes to a survey form
CGI FILE:
HTML FILE:#!/usr/bin/perl #-----------------------------------------------------------# # # BNBSURVEY Script 3.2.2, (C)2000-2002 Bignosebird.com # Use of this script means that you accept the disclaimer and # agree to the terms of use located at the bottom of the # script. # # This script is provided without support. Please read the # README.TXT file, as well as following the troubleshooting # links and information at http://bignosebird.com/cgi.shtml # Our BBS is located at http://bbs.bignosebird.com/ # # Additional security patch added 12-30-2000 in decode # subroutine. # # Added option to block multiple vote attempts using IP # address. Additional security mods. (02-10-2002) # Modified IP based multi-vote blocking to allow time based # blocking as well. (02-16-2002) # IMPORTANT: This changed the format of the log file. There # is now a integer number representing the vote time located # between the human readable date and the first vote response # field. # #------------SCRIPT CONFIGURATION SECTION-------------------- # The script can be called in this manner to provide view without # voting: # http://longvalleyantiques.com/cgi-bin/survey/survey.cgi?survey_name= +number1 # $DATA_PATH is the FULL system path to the directory where # your survey data files are stored. Your web server must have # permission to write to and create files in this directory $DATA_PATH= "/html/users/longvalleyantiquescom/html/cgi-bin/survey"; # The $DOMAIN must be your site's domain name. $DOMAIN="www.longvalleyantiques.com"; # $GRAPHICSDIR is the directory under your main html directory # containing the colored gif files. $GRAPHICSDIR="survey"; # To prevent people from voting too often, set $USE_COOKIES=1 # HOURS is the NUMBER OF HOURS before the voter can vote # again. 1 Day=24, 1 Week=168, 1 Month=720 give or take.... # To disable cookies, let $USE_COOKIES=0 # # WARNING: DO NOT ENABLE COOKIES UNTIL YOU ARE SURE EVERYTHING # IS WORKING PERFECTLY, OR YOUR DEBUGGING CAN BE SERIOUSLY # SLOWED DOWN WHILE YOU WAIT FOR THE COOKIE TO EXPIRE. ;-) $USE_COOKIES=0; $HOURS=0; # one hour delay between votes # Set $USE_LOGGING to 1 to turn on log file capture. # Log format is an ASCII tab delimited file consisting of: # Visitor's IP address, date, time, responses, e-mail, comments # Can be easily imported into spreadsheets and databases $USE_LOGGING=1; # If you USE_LOGGING, you can also block multiple votes from # the same IP address. Just set $BLOCK_IP=1 # If $HOURS (from above) is set to zero, a voter from an IP # address can only vote once. You can set a minimum time # between votes by setting $HOURS=1 (as an example) to allow # a voter from an IP address to vote every hour. $BLOCK_IP=0; # IF $SHOW_RESULTS=0 (do not display after voting), be sure # to set $JUMP_URL to the page the voter should be sent to. # By default, it sends the voter back to the page they came from. # When used with SHOW_RESULTS=1, this is the link they can click # on after viewing the voting. $SHOW_RESULTS=1; $JUMP_URL="$ENV{'HTTP_REFERER'}"; # These are the cosmetic settings in case you do not like my # terrible taste in colors! The actual result page layout can # be found near the bottom of the script. $TABLECOLOR="#FFFFFF"; $HEADINGCOLOR="#000000"; $HEADINGFONT="arial,helvetica"; $BORDERCOLOR="#000000"; $FONT="arial,helvetica"; $FONTCOLOR="#000066"; # the script starts for real here.... &decode_vars; &check_files; if ($ENV{'REQUEST_METHOD'} eq "POST" && -e $DATA_FILE && -w $DATA_FI +LE){ if ($BLOCK_IP == 1 && $USE_LOGGING == 1 && &is_blocked == 1 ){ &already_voted; exit; } if ($USE_COOKIES == 1){ $COOKIEVAL=&get_cookie($SURVEY_NAME); if ( $COOKIEVAL > time){ &already_voted; exit; } else{ $cookie=&set_cookie($SURVEY_NAME,(time + ($HOURS * 3600)),$HOURS +); print "$cookie\n"; } } $MODE="VOTE"; &set_colors; &process_file; &do_stats; if ($SHOW_RESULTS == 1){ print "Content-type: text/html\n\n"; $PAGEHEADER=&set_page_header; $PAGEFOOTER=&set_page_footer; print "$PAGEHEADER\n"; &display_stats; print "$PAGEFOOTER\n"; } else{ print "Location: $JUMP_URL\n\n"; } exit; } if ($ENV{'REQUEST_METHOD'} eq "GET" && -e $DATA_FILE){ $MODE="VIEW"; &set_colors; &process_file; &do_stats; $PAGEHEADER=&set_page_header; $PAGEFOOTER=&set_page_footer; print "Content-type: text/html\n\n"; print "$PAGEHEADER\n"; &display_stats; print "$PAGEFOOTER\n"; exit; } sub do_stats{ $oldtag="NONE"; @groups=(); foreach $toshow (@list){ @tags=split(/\|/,$toshow); if ($tags[0] ne $oldtag){ $group=$tags[0]; push(@groups,$group); $total{$group}=0; $oldtag = $tags[0]; } $total{$group} = $total{$group} + $questions{$toshow}; } } sub display_stats{ $oldgroup="NONE"; $itemcount=0; foreach $toshow (@list){ @tags=split(/\|/,$toshow); if ($tags[0] ne $oldgroup){ if ($oldgroup ne "NONE"){ $GROUPFOOTER=&set_footer($total{$group}); print "$GROUPFOOTER\n"; } $group=$tags[0]; $GROUPHEAD=&set_group_header($title{$group}); print "$GROUPHEAD\n"; $oldgroup=$group; $itemcount=0; } if ($total{$group} > 0){ $pct=int((($questions{$toshow} / $total{$group} * 100)+.5)) ; } else{ $pct=0; } @qi=split(/\|/,$toshow); $giffile=@colors[$itemcount]; $RESPONSELINE=&set_question($qi[1],$questions{$toshow},$pct, $giffi +le); print "$RESPONSELINE\n"; $itemcount = $itemcount + 1; } $GROUPFOOTER=&set_footer($total{$group}); print "$GROUPFOOTER\n"; } sub process_file { &get_the_lock; if ($USE_LOGGING == 1 && $MODE eq "VOTE"){ $SYSTIME=&sys_date; $SYSINT=time; $LOG_LINE="$ENV{'REMOTE_ADDR'}\t$SYSTIME\t$SYSINT\t"; open(LO,">>$LOG_FILE"); } open(IX,"<$DATA_FILE"); while ($line=<IX>){ @loga=(); chop $line; @parts=split(/:/,$line); $q=$parts[0]; $n=$parts[1]; $t=$parts[2]; @tags=split(/\|/,$line); $ti=$tags[0]; $title{$ti} = $t; $titles{$q} = $t; if ($fields{$ti} eq $q){ $questions{$q} = $n + 1; @loga=split(/\|/,$q); if ($USE_LOGGING == 1 && $MODE eq "VOTE"){$LOG_LINE .= "$loga[1]\ +t";} } else{ $questions{$q} = $n; } push(@list,$q); } close(IX); if ($MODE eq "VOTE"){ open(IY,">$DATA_FILE"); foreach $toshow (@list){ print IY "$toshow:$questions{$toshow}:$titles{$toshow}:\n"; } close(IY); } if ($USE_LOGGING == 1 && $MODE eq "VOTE"){ if ($fields{'email'} eq ""){$fields{'email'}="no-email";} if ($fields{'comments'} eq ""){$fields{'comments'}="no-comment";} $LOG_LINE .= "$fields{'email'}\t$fields{'comments'}"; print LO "$LOG_LINE\n"; close(LO); } &drop_the_lock; } sub set_colors{ #this allows for up to 22 responses per question. if you have more, ju +st #continue duplicating the middle two lines of the array below... @colors=("blue.gif","red.gif","green.gif","yellow.gif","cherry.gif", "navy.gif","pink.gif","black.gif","teal.gif","purple.gif"," +sky.gif", "blue.gif","red.gif","green.gif","yellow.gif","cherry.gif", "navy.gif","pink.gif","black.gif","teal.gif","purple.gif"," +sky.gif"); } sub decode_vars { $i=0; if ( $ENV{'REQUEST_METHOD'} eq "GET") { $temp=$ENV{'QUERY_STRING'}; } else { read(STDIN,$temp,$ENV{'CONTENT_LENGTH'}); } @pairs=split(/&/,$temp); foreach $item(@pairs) { ($key,$content)=split(/=/,$item,2); $content=~tr/+/ /; $content=~s/%(..)/pack("c",hex($1))/ge; $content=~s/\0//g; $key=~s/\0//g; $content=~s/\012//gs; $content=~s/\015/ /gs; $fields{$key}=$content; } if ($fields{'survey_name'}=~/^([-\@\w.]+)$/){ $SURVEY_NAME=$fields{'survey_name'}; } else {exit;} $fields{'comments'}=~s/\t/ /g; $fields{'email'}=&valid_address($fields{'email'}); } sub valid_address { my ($testmail) = @_; if ($testmail =~/ /) { return ""; } if ($testmail =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ || $testmail !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3}) +(\]?)$/) { return ""; } else { return $testmail; } } sub get_the_lock { if ($MODE ne "VOTE"){return;} my $lockfile="$DATA_PATH/$SURVEY_NAME\.lkk"; local ($endtime); $endtime = 40; $endtime = time + $endtime; while (-e $lockfile && time < $endtime) { # Do Nothing } open(LOCK_FILE, ">$lockfile"); } sub drop_the_lock { if ($MODE ne "VOTE"){return;} $lockfile="$DATA_PATH/$SURVEY_NAME\.lkk"; close(LOCK_FILE); unlink($lockfile); } sub already_voted{ print "Content-type: text/html\n\n"; print<<__END_ALREADY_VOTED__; <h2 align=center>You Already Voted!</h2> __END_ALREADY_VOTED__ } # # This routine takes (name,value,hours,path,domain) as arguments # to set a cookie. # # 0 hours means a current browser session cookie life # sub set_cookie() { my ($name,$value,$expires) = @_; $name=&cookie_scrub($name); $value=&cookie_scrub($value); $expires=$expires * 3600; $expires=int($expires); my $expire_at=&cookie_date($expires); my $namevalue="$name=$value"; my $COOKIE=""; if ($expires != 0) { $COOKIE= "Set-Cookie: $namevalue; path=$path; expires=$expire_at; + "; } else { $COOKIE= "Set-Cookie: $namevalue; "; #current session cookie if + 0 } return $COOKIE; } # # This routine removes cookie of (name) by setting the expiration # to a date/time GMT of (now - 24hours) # sub remove_cookie() { my ($name) = @_; $name=&cookie_scrub($name); my $value=""; my $cookie=""; my $expires=&cookie_date(-86400); my $namevalue="$name=$value"; my $COOKIE= "Set-Cookie: $namevalue; expires=$expires; "; return $COOKIE; } # # given a cookie name, this routine returns the value component # of the name=value pair # a returned value of 0 means no cookie # sub get_cookie() { my ($name) = @_; $name=&cookie_scrub($name); my $temp=$ENV{'HTTP_COOKIE'}; @pairs=split(/\; /,$temp); foreach my $sets (@pairs) { my ($key,$value)=split(/=/,$sets); $clist{$key} = $value; } if ($clist{$name} eq "") {$clist{$name}="0";} my $retval=$clist{$name}; return $retval; } # # this routine accepts the number of seconds to add to the server # time to calculate the expiration string for the cookie. Cookie # time is ALWAYS GMT! # sub cookie_date() { my ($seconds) = @_; my %mn = ('Jan','01', 'Feb','02', 'Mar','03', 'Apr','04', 'May','05', 'Jun','06', 'Jul','07', 'Aug','08', 'Sep','09', 'Oct','10', 'Nov','11', 'Dec','12' ); my $sydate=gmtime(time+$seconds); my ($day, $month, $num, $time, $year) = split(/\s+/,$sydate); my $zl=length($num); if ($zl == 1) { $num = "0$num"; } my $retdate="$day $num-$month-$year $time GMT"; return $retdate; } # # don't allow = or ; as valid elements of name or data # sub cookie_scrub() { my($retval) = @_; $retval=~s/\;//g; $retval=~s/\=//g; return $retval; } # # check to see if the IP of this client has been logged. # if so, return 1 to indicate client should be blocked. # only called if $USE_LOGGING and $BLOCK_IP are set to 1. # added 02/10/2002 # # Modified on 02/16/2002 so that if $HOURS are not equal # to 0, you can control the time between votes based on # IP address the same way as with cookies. # sub is_blocked{ my $current_time=time; my @solog=(); open(OLOGS,"<$LOG_FILE"); my @logs=<OLOGS>; close(OLOGS); my $lcounter=@logs; for ($lcounter; $lcounter >= 0; $lcounter--){ if ( $logs[$lcounter]=~/^$ENV{'REMOTE_ADDR'}/){ if ($HOURS == 0){ return 1; } @solog=split(/\t/,@logs[$lcounter]); if ( ($solog[3] + ($HOURS * 3600)) > $current_time ){ return 1; } } } return 0; } sub sys_date{ my %mn = ('Jan','01', 'Feb','02', 'Mar','03', 'Apr','04', 'May','05', 'Jun','06', 'Jul','07', 'Aug','08', 'Sep','09', 'Oct','10', 'Nov','11', 'Dec','12' ); my $sydate=localtime(time); my ($day, $month, $num, $time, $year) = split(/\s+/,$sydate); my $zl=length($num); if ($zl == 1) { $num = "0$num";} my $retval="$year\-$mn{$month}\-$num\t$time"; return $retval; } sub check_files{ $DATA_FILE="$DATA_PATH/$SURVEY_NAME\.srv"; $LOG_FILE="$DATA_PATH/$SURVEY_NAME\.log"; if ( !-e $DATA_FILE){ print "Content-type: text/html\n\n Data File is Missing!\n"; exit; } if ( !-w $DATA_FILE){ print "Content-type: text/html\n\n Data File Cannot be Written to!\ +n"; exit; } if ( !-e "$LOG_FILE" && $USE_LOGGING == 1){ open(OP,">>$LOG_FILE"); close(OP); } if ( !-w "$DATA_PATH/$SURVEY_NAME\.log" && $USE_LOGGING == 1){ print "Content-type: text/html\n\n Log File Cannot be Written to!\n +"; exit; } } ######################## COSMETIC SECTION ########################## # # The following subroutines contain the HTML text (and some logic # so be careful editing!) that is presented when viewing the survey # results. # sub set_page_header{ my $PAGEHEAD=<<__END_PAGE_HEAD__; <BODY BGCOLOR="#FFFFFF"> <CENTER> <TABLE BORDER=0 BGCOLOR="$BORDERCOLOR" WIDTH=576> <TR> <TD ALIGN=CENTER> <TABLE BORDER=1 BGCOLOR="$TABLECOLOR" WIDTH=574> <TR> <TD COLSPAN=4> <CENTER> <FONT FACE="$HEADINGFONT" COLOR="$HEADINGCOLOR"> <FONT SIZE=5>The Survey Results!</FONT> <BR> <FONT SIZE=3>College Freshmen</FONT> <CENTER> <P> __END_PAGE_HEAD__ return $PAGEHEAD; } sub set_group_header{ my ($GROUP_HEADING)=@_; my $GROUP_HEADER=<<__END_GROUP_HEADER__; <TR> <TD COLSPAN=4 ALIGN=CENTER> <FONT FACE="$HEADINGFONT" COLOR="$HEADINGCOLOR"><B>$GROUP_HEADING</B +></FONT> </TD> </TR> <TR> <TD WIDTH=215><FONT FACE="$FONT" COLOR="$FONTCOLOR"><U>Response</U>< +/TD> <TD WIDTH=30 ALIGN=RIGHT><FONT FACE="$FONT" COLOR="$FONTCOLOR"><U>Nu +mber</U></TD> <TD WIDTH=30 ALIGN=RIGHT><FONT FACE="$FONT" COLOR="$FONTCOLOR"><U>Pe +rcent</U></TD> <TD WIDTH=300><FONT FACE="$FONT" COLOR="$FONTCOLOR"><U>Graph</U></TD +> </TR> __END_GROUP_HEADER__ return $GROUP_HEADER; } sub set_question{ my ($respitem,$count,$pct,$giffile) = @_; my $factor = $pct * 2.50; my $SCALE=int($factor); my $RESPONSE=<<__END_RESPONSE_LINE__; <TR> <TD VALIGN=TOP><FONT FACE="$FONT" COLOR="$FONTCOLOR">$respitem</FONT +></TD> <TD VALIGN=TOP ALIGN=RIGHT><FONT FACE="$FONT" COLOR="$FONTCOLOR">$co +unt</FONT></TD> <TD VALIGN=TOP ALIGN=RIGHT><FONT FACE="$FONT" COLOR="$FONTCOLOR">$pc +t\%</FONT></TD> <TD><IMG SRC="http://$DOMAIN/$GRAPHICSDIR/$giffile" HEIGHT=5 WIDTH=$ +SCALE BORDER=0></TD> </TR> __END_RESPONSE_LINE__ return $RESPONSE; } sub set_footer{ my ($tot) = @_; my $FOOTGROUP=<<__END_GROUP_FOOTER__; <TR> <TD COLSPAN=4 ALIGN=CENTER><FONT FACE="$FONT" COLOR="$FONTCOLOR">Total + Number of Responses: $tot<P></FONT></TD> </TR> __END_GROUP_FOOTER__ return $FOOTGROUP; } sub set_page_footer{ my $PAGEFOOT=<<__END_PAGE_FOOT__; </TD> </TR> <TR> <TD COLSPAN=4 ALIGN=CENTER> </TD> </TR> </TABLE> </TD> </TR> </TABLE> </CENTER> __END_PAGE_FOOT__ return $PAGEFOOT; } #--------DISCLAIMER-AND-COPYRIGHT-INFORMATION------------------------- +--# # ANY SOFTWARE PROVIDED BY BIGNOSEBIRD.COM, INC. IS ``AS IS'' AND ANY # EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BIGNOSEBIRD.COM, INC. OR # ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE +, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON AN +Y # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAM +AGE. # THIS SCRIPT IS PROVIDED WITHOUT SUPPORT # # THIS SCRIPT IS FREEWARE AND CAN BE USED FOR BOTH COMMERCIAL AND # NON-COMMERCIAL USE. REPUBLICATION OF THE SCRIPT REQUIRES OUR PERMISS +ION. # webmaster\@bignosebird.com #--------------------------------------------------------------------- +--#
SRV FILE:<BODY BGCOLOR="#FFFFFF"> <CENTER> <FORM ACTION="/cgi-bin/survey/survey.cgi" METHOD="POST"> <TABLE WIDTH=560 BORDER=0 BGCOLOR="#CCE6FF"> <TR> <TD ALIGN=CENTER> <B><FONT FACE="ARIAL" SIZE=3>College Survey</FONT></B> <br>for college freshmen <BR><BR> <i>Welcome! I am conducting this survey for statistical information. Y +our identity will not be disclosed to anyone in accordance with our privacy policy. Please +fill this out carefully and put honesty into it because all information you provide +is very important. <br> Your email is being asked just in case I have to add or change questio +ns and I know that I can email you to get the results from the exact same audience. <br> Thank you for filling out this survey!</i> <BR> <P> <TABLE WIDTH=550 BORDER=0 BGCOLOR="#FFFFCC"> <TR> <TD> <Font face="tahoma" size="2">E-Mail Address </TD> <TD> <INPUT TYPE="TEXT" NAME="email" VALUE=""><Font face="tahoma" size=" +2">(optional)</font> </TD> </TR> <TR> <TD> <P> <P> </TD> </TR> <TR> <TD> <Font face="tahoma" size="2">Gender </TD> <TD> <Font face="tahoma" size="2"> <INPUT TYPE="RADIO" NAME="ITEM_1" VALUE="ITEM_1|Male" >Male <INPUT TYPE="RADIO" NAME="ITEM_1" VALUE="ITEM_1|Female" >Female <INPUT TYPE="RADIO" NAME="ITEM_1" VALUE="ITEM_1|No Answer" checked> +No Answer </TD> </TR> <TR> <TD> <Font face="tahoma" size="2"> <P> <P> </TD> </TR> <TR> <TD colspan="2" align="center"> <SELECT NAME="state"> <OPTION NAME ="ITEM_2" SELECTED VALUE=""> Select Your Home State <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Alabama"> Alabama <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Alaska"> Alaska <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Arizona"> Arizona <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Arkansas"> Arkansas <OPTION NAME ="ITEM_2" VALUE="ITEM_2|California"> California <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Colorado"> Colorado <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Connecticut"> Connecticut <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Delaware"> Delaware <OPTION NAME ="ITEM_2" VALUE="ITEM_2|District of Columbia"> District o +f Columbia <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Florida"> Florida <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Georgia"> Georgia <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Hawaii"> Hawaii <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Idaho"> Idaho <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Illinois"> Illinois <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Indiana"> Indiana <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Iowa"> Iowa <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Kansas"> Kansas <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Kentucky"> Kentucky <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Louisiana"> Louisiana <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Maine"> Maine <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Maryland"> Maryland <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Massachusetts"> Massachusetts <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Michigan"> Michigan <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Minnesota"> Minnesota <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Mississippi"> Mississippi <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Missouri"> Missouri <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Montana"> Montana <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Nebraska"> Nebraska <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Nevada"> Nevada <OPTION NAME ="ITEM_2" VALUE="ITEM_2|New Hampshire"> New Hampshire <OPTION NAME ="ITEM_2" VALUE="ITEM_2|New Jersey"> New Jersey <OPTION NAME ="ITEM_2" VALUE="ITEM_2|New Mexico"> New Mexico <OPTION NAME ="ITEM_2" VALUE="ITEM_2|New York"> New York <OPTION NAME ="ITEM_2" VALUE="ITEM_2|North Carolina"> North Carolina <OPTION NAME ="ITEM_2" VALUE="ITEM_2|North Dakota"> North Dakota <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Ohio"> Ohio <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Oklahoma"> Oklahoma <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Oregon"> Oregon <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Pennsylvania"> Pennsylvania <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Rhode Island"> Rhode Island <OPTION NAME ="ITEM_2" VALUE="ITEM_2|South Carolina"> South Carolina <OPTION NAME ="ITEM_2" VALUE="ITEM_2|South Dakota"> South Dakota <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Tennessee"> Tennessee <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Texas"> Texas <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Utah"> Utah <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Vermont"> Vermont <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Virginia"> Virginia <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Washington"> Washington <OPTION NAME ="ITEM_2" VALUE="ITEM_2|West Virginia"> West Virginia <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Wisconsin"> Wisconsin <OPTION NAME ="ITEM_2" VALUE="ITEM_2|Wyoming"> Wyoming </SELECT> </TD> </TR> <TR> <TD> <Font face="tahoma" size="2"> <P> <P> </TD> </TR> <TR> <TD colspan="2"> <Font face="tahoma" size="2"> 1. Do you prefer applying to colleges online or offline? </TD> </TR> <TR> <TD colspan="2" align="right"> <Font face="tahoma" size="2"> <INPUT TYPE="RADIO" NAME="ITEM_3" VALUE="ITEM_3|Online" >Online <INPUT TYPE="RADIO" NAME="ITEM_3" VALUE="ITEM_3|Offline" >Offline <INPUT TYPE="RADIO" NAME="ITEM_3" VALUE="ITEM_3|No Preference" chec +ked>No Preference </TD> </TR> <TR> <TD> <Font face="tahoma" size="2"> <P> <P> </TD> </TR> <TD colspan="2"> <Font face="tahoma" size="2"> 2. If you did not have the opportunity to apply to colleges online, + would you have preferred to apply online? </TD> </TR> <TR> <TD colspan="2" align="right"> <Font face="tahoma" size="2"> <INPUT TYPE="RADIO" NAME="ITEM_4" VALUE="ITEM_4|Yes" >Yes <INPUT TYPE="RADIO" NAME="ITEM_4" VALUE="ITEM_4|No" >No <INPUT TYPE="RADIO" NAME="ITEM_4" VALUE="ITEM_4|No Answer" checked> +No Answer </TD> </TR> <TR> <TD> <Font face="tahoma" size="2"> <P> <P> </TD> </TR> <TD colspan="2"> <Font face="tahoma" size="2"> 3. When online, if you could apply to more than one college at a time, + using only one application form, would you take advantage of this opportunity? </TD> </TR> <TR> <TD colspan="2" align="right"> <Font face="tahoma" size="2"> <INPUT TYPE="RADIO" NAME="ITEM_5" VALUE="ITEM_5|Yes" >Yes <INPUT TYPE="RADIO" NAME="ITEM_5" VALUE="ITEM_5|No" >No <INPUT TYPE="RADIO" NAME="ITEM_5" VALUE="ITEM_5|No Answer" checked> +No Answer </TD> </TR> <TR> <TD> <Font face="tahoma" size="2"> <P> <P> </TD> </TR> <TD colspan="2"> <Font face="tahoma" size="2"> 4. With regard to question 3, would you pay a one-time $20.00 fee to a +pply to more than one college, excluding the cost for the application fee? </TD> </TR> <TR> <TD colspan="2" align="right"> <Font face="tahoma" size="2"> <INPUT TYPE="RADIO" NAME="ITEM_6" VALUE="ITEM_6|Yes" >Yes <INPUT TYPE="RADIO" NAME="ITEM_6" VALUE="ITEM_6|No" >No <INPUT TYPE="RADIO" NAME="ITEM_6" VALUE="ITEM_6|No Answer" checked> +No Answer </TD> </TR> <TR> <TD> <Font face="tahoma" size="2"> <P> <P> </TD> </TR> <TD colspan="2"> <Font face="tahoma" size="2"> 5. Checkmark all of the functions, provided you were a registered memb +er (you paid the $20.00 one-time registration fee), that you would have liked to have w +ith your account?<P> </TD> </TR> <TR> <TD colspan="2" align="left"> <Font face="tahoma" size="2"> <INPUT TYPE="checkbox" NAME="ITEM_7" VALUE="ITEM_7|Yes" >New email +address used primarily to receive and respond to emails from college-related material <P> <INPUT TYPE="checkbox" NAME="ITEM_7" VALUE="ITEM_7|Yes" >Option to +see a list of colleges you could apply to with the information and facts about the college <P> <INPUT TYPE="checkbox" NAME="ITEM_7" VALUE="ITEM_7|Yes" >Your perso +nal information and universal questions (name, address, etc.) already in the database so y +ou do not have to re-type that information again. This would allow you to concentrate on + non-universal questions (such as essays) <P> <INPUT TYPE="checkbox" NAME="ITEM_7" VALUE="ITEM_7|Yes" >A portfolio t +hat consists of the colleges you A. Will apply to B. ALready applied to C. Might apply to. <P> <INPUT TYPE="checkbox" NAME="ITEM_7" VALUE="ITEM_7|Yes" >Ability to + find money for college via almost a million scholarships plus financial aid tips <P> <INPUT TYPE="checkbox" NAME="ITEM_7" VALUE="ITEM_7|Yes" >To have ac +ceptance/rejection letters sent to you in the portfolio, by email, and by postal mail </TD> </TR> <TR> <TD> <Font face="tahoma" size="2"> <P> <P> </TD> </TR> <TR> <TD> <Font face="tahoma" size="2"> Comments </TD> <TD> <INPUT TYPE="TEXT" NAME="comments" SIZE="75" MAXLENGTH="1000" VALUE +=""> </TD> </TR> <TR> <TD colspan=2> <INPUT TYPE="SUBMIT" VALUE="SUBMIT"> <INPUT TYPE="hidden" NAME="survey_name" VALUE="survey"> </TD> </TR> </TABLE> </TD> </TR> </TABLE> </FORM>
ITEM_1|Male:0:Respondent's Sex: ITEM_1|Female:0:Respondent's Sex: ITEM_1|No Answer:0:Respondent's Sex: ITEM_2|Alabama:0:State: ITEM_2|Alaska:0:State: ITEM_2|Arizona:0:State: ITEM_2|Arkansas:0:State: ITEM_2|California:0:State: ITEM_2|Colorado:0:State: ITEM_2|Connecticut:0:State: ITEM_2|Delaware:0:State: ITEM_2|District of Columbia:0:State: ITEM_2|Florida:0:State: ITEM_2|Georgia:0:State: ITEM_2|Hawaii:0:State: ITEM_2|Idaho:0:State: ITEM_2|Illinois:0:State: ITEM_2|Indiana:0:State: ITEM_2|Iowa:0:State: ITEM_2|Kansas:0:State: ITEM_2|Kentucky:0:State: ITEM_2|Louisiana:0:State: ITEM_2|Maine:0:State: ITEM_2|Maryland:0:State: ITEM_2|Massachusetts:0:State: ITEM_2|Michigan:0:State: ITEM_2|Minnesota:0:State: ITEM_2|Mississippi:0:State: ITEM_2|Missouri:0:State: ITEM_2|Montana:0:State: ITEM_2|Nebraska:0:State: ITEM_2|Nevada:0:State: ITEM_2|New Hampshire:0:State: ITEM_2|New Jersey:0:State: ITEM_2|New Mexico:0:State: ITEM_2|New York:0:State: ITEM_2|North Carolina:0:State: ITEM_2|North Dakota:0:State: ITEM_2|Ohio:0:State: ITEM_2|Oklahoma:0:State: ITEM_2|Oregon:0:State: ITEM_2|Pennsylvania:0:State: ITEM_2|Rhode Island:0:State: ITEM_2|South Carolina:0:State: ITEM_2|South Dakota:0:State: ITEM_2|Tennessee:0:State: ITEM_2|Texas:0:State: ITEM_2|Utah:0:State: ITEM_2|Vermont:0:State: ITEM_2|Virginia:0:State: ITEM_2|Washington:0:State: ITEM_2|West Virginia:0:State: ITEM_2|Wisconsin:0:State: ITEM_2|Wyoming:0:State: ITEM_3|Online:0:Prefer to apply online v offline: ITEM_3|Offline:0:Prefer to apply online v offline: ITEM_3|No Preference:0:Prefer to apply online v offline: ITEM_4|Yes:0:Would prefer to apply online with opportunity: ITEM_4|No:0:Would prefer to apply online with opportunity: ITEM_4|No Answer:0:Would prefer to apply online with opportunity: ITEM_5|Yes:0:Would use one form: ITEM_5|No:0:Would use one form: ITEM_5|No Answer:0:Would use one form: ITEM_6|Yes:0:Would pay registeration fee ($20): ITEM_6|No:0:Would pay registeration fee ($20): ITEM_6|No Answer:0:Would pay registeration fee ($20): ITEM_7|Want own email address:0:Functions: ITEM_7|Want college list:0:Functions: ITEM_7|Want pre-answered questions:0:Functions: ITEM_7|Want portfolio:0:Functions: ITEM_7|Want scholarship info:0:Functions: ITEM_7|Want all forms of contact for admissions status:0:Functions:
Edit kudra, 2003-02-23 Added code tags
Edit broquaint, 2002-02-24 Added <readmore> tag
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Trying to add checkboxes to a survey form
by Anonymous Monk on Feb 22, 2003 at 19:32 UTC |