George Fox University | Offices and Services | Institutional Technology | Adding a Multi-Line Text Box

Adding a Multi-Line Text Box

Okay, a brief line of text is great for inputting a name or address, but what if you want to capture a paragraph? Enter the textarea tag. Here's your next snippet of code:



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

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

<textarea rows=4 cols=30 name=WhyThere>why there?</textarea>

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

</form>



The TEXTAREA tag provides a place for a paragraph (or more) of text. To use this tag, you'll need to include both opening and closing tags. Let's talk about it's attributes.

  1. ROWS - a number like 4 will give the user a box that will accept 4 lines of text before scrolling begins.
  2. COLS - this denotes the approximate width of the textarea 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.

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


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