4 use CGI::Carp qw/fatalsToBrowser/;
9 print $query->start_html("Example CGI.pm Form");
10 print "<H1> Example CGI.pm Form</H1>\n";
11 &print_prompt($query);
14 print $query->end_html;
19 print $query->start_form;
20 print "<EM>What's your name?</EM><BR>";
21 print $query->textfield('name');
22 print $query->checkbox('Not my real name');
24 print "<P><EM>Where can you find English Sparrows?</EM><BR>";
25 print $query->checkbox_group(
26 -name=>'Sparrow locations',
27 -Values=>[England,France,Spain,Asia,Hoboken],
29 -defaults=>[England,Asia]);
31 print "<P><EM>How far can they fly?</EM><BR>",
34 -Values=>['10 ft','1 mile','10 miles','real far'],
37 print "<P><EM>What's your favorite color?</EM> ";
38 print $query->popup_menu(-name=>'Color',
39 -Values=>['black','brown','red','yellow'],
42 print $query->hidden('Reference','Monty Python and the Holy Grail');
44 print "<P><EM>What have you got there?</EM><BR>";
45 print $query->scrolling_list(
47 -Values=>['A Coconut','A Grail','An Icon',
48 'A Sword','A Ticket'],
52 print "<P><EM>Any parting comments?</EM><BR>";
53 print $query->textarea(-name=>'Comments',
57 print "<P>",$query->reset;
58 print $query->submit('Action','Shout');
59 print $query->submit('Action','Scream');
60 print $query->endform;
68 print "<H2>Here are the current settings in this form</H2>";
70 foreach $key ($query->param) {
71 print "<STRONG>$key</STRONG> -> ";
72 @values = $query->param($key);
73 print join(", ",@values),"<BR>\n";
80 <ADDRESS>Lincoln D. Stein</ADDRESS><BR>
81 <A HREF="/">Home Page</A>