George Fox University | Offices and Services | Institutional Technology | Making a Form That Does Something

Making a Form That Does Something

Copy this code and paste it into a plain text word processor, like Windows Notepad.



<form method=post action="https://scripts.georgefox.edu/cgi-bin/FormMail.pl" name="example2">

<input type=hidden name=recipient value=bweldon@georgefox.edu>

<input type=text size=40 name=VacationSpot value="where do you like to vacation?">

<br><input type=submit name=submit value=submit><input type=reset name=reset value=reset>

</form>



Notice we've added a value to the form action attribute. Use:
- https://scripts.georgefox.edu/cgi-bin/FormMail.pl (this is case sensitive).

We've added a special input type whose type value is "hidden". This input type is special because, like the value states, from the web page, it's invisible or hidden. Let's talk about it's attributes.

  1. TYPE - when set to "hidden", the hard-coded name/value pair will be passed to the script, but there will be no indication on the webpage.
  2. NAME - when set to "recipient", the script will gather all the form elements and package them into an email, to be sent to the email address attached to the "value".
  3. VALUE - use the foxmail email address you want the form data sent to. If you want the form data to be sent to a variety of people, list their email addresses within the quotes, each seperated by a comma.

We've added a place for text input. Let's talk about it's attributes.

  1. TYPE - when set to "text", you'll get a one line text box that brief text can be typed into.
  2. SIZE - this denotes the approximate width of the text box on the web page.
  3. NAME - although a name is not required for the script to work, it's a good idea to include it now, as it will be required if you use JavaScript at a latter date.

And what about the submit and reset buttons?

  1. TYPE - when set to "submit", you'll get the submit button. Pretty much required. (Reset is optional - probably useful if your user is going to reuse the form multiple times, ie entering product data)
  2. NAME - although a name is not required for the script to work, it's a good idea to include it now, as it will be required if you use JavaScript at a latter date.
  3. VALUE - this sets the visible text on the button.

The form should look like this on a web page now.


This page was last updated 3-29-2008 19:09:58.
For questions or comments about this page, please email the webmaster.