1 |
Here's an example of a form generated by CGI.pm function calls:
|
2 |
print start_form( # <FORM> tag
-
-method=>'POST', # default
-
-action=>'fill-out-form.pl'
-
);
|
3 |
print p( "Type in your street address:\n",
-
textfield( # a textfield
-
-name=>'address', -size=>36
-
)
-
);
|
4 |
print p( 'What kind of pizza would you like?' );
|
5 |
print blockquote( # requires :shortcuts
-
radio_group(
-
-name=>'topping',
-
-values=>['Pepperoni','Sausage','Anchovy']
-
) # an anonymous array
-
);
|
6 |
print p( 'To place your order, click here:',
-
submit('Order Pizza'), # submit button
-
reset('Clear') # reset button
-
);
|
7 |
print end_form(); # </FORM> tag
|