Web Form Examples

Text Field Example

  • "for" property of label tag and "id" property in input tag need to have the same name.
  • The form tag will send "id=...&pw=..." to the CGI program (cgi-bin/text_field.pl).

Text Box Example

Radio Button Example

Gender:

  • When male is selected, "gender=Male" will be sent to the CGI program.
  • Therefore, variable name (name="") should be the same across input for gender

Checkbox Example

Interest:

  • When software is selected, "interest=S/W" will be sent to the CGI program.
  • Therefore, variable name (interest="") should be the same across input for gender

Select Example

  • When hiking is selected, "hobby=hike" will be sent to the CGI program.