<SELECT NAME='State' SIZE=1> <OPTION>CA <OPTION>WA <OPTION>OR <OPTION>NV <OPTION>AZ </SELECT>
Using CGI::Form
, a call to the method popup_menu
, is shown here:
@states=( `CA', `WA', `OR', `NV', `AZ' ); $q->popup_menu( -name=>'State', -values=>\@states, -default=>'CA' );
File-Upload Fields
File-upload fields enable the user to specify files for uploading to the server. Note that if you plan to use file-upload fields in your form, you must define your form as multipart/form-data. This is the new MIME type introduced by Netscape 2.0 for handling large amounts of data sent back to the server. This type also allows for binary data to be embedded within the form.
Using raw HTML, create file-upload fields with the INPUT
tag and TYPE
file:
<INPUT TYPE=file NAME=theFile>
Using CGI::Form
, this is a call to the method filefield
:
$q->filefield( -name=>'theFile' );