Project 7 Handout
Project 7 Handout
Creating Forms
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<form method=”post”
action=”mailto:[email protected]”>
Project 7
Creating Forms
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
action The next tag specifies the action that is taken when the form is submitted
Information sent by: e-mail
Information sent to: a database
o processed by CGI script
method This tag specifies the manner in which the data is sent to the server to be processed
Get method—sends the name-value pairs to the end of the URL indicated in the action attribute
Post method—sends a separate data file with the name-value pairs to the URL (or e-mail address)
indicated in the action attribute
</form>
<input> tag Creates an input control (see table for types of input controls)
<input name=”pictype” (used to distinguish the values associated with these checkbox fields from other fields)
type=”checkbox”
value=”choice1“Choice One (indicates the value submitted in the file if this checkbox is selected)
Adding a selection menu control: (See pages 306-307 for advanced menus)
<Select name=”payment”>
<option>Visa</option>
<option>Discover</option>
</select>
<input name=” ” (used to distinguish the values associated with these checkbox fields from other fields)
type=”radio” value=”yes“>Yes
Adding a textarea control:
FORM GROUPINGS
Group similar information on a form
Useful for designating which information is required and which is optional
</fieldset>
<option>MasterCard</option>
<option>American Express</option>
</select>
</body>
</html>
Types of Input Controls:
type=
<fieldset>
</form>
</body>
</html>
<input> tag
Creates an input control (see table for types of
input controls)
<Select name=”payment”>
<option>Visa</option>
<option>Discover</option>
</select>
FORM GROUPINGS
Group similar information on a form
Useful for designating which
information is required and which is
optional