User Guide

Using Forms to Specify the Data to Retrieve 43
<!-- check box -->
<p>
Contractor? <input type="checkbox" name="Contractor" value="Yes"
checked>Yes
</p>
<!-- reset button -->
<input type="Reset" name="ResetForm" value="Clear Form">
<!-- submit button -->
<input type="Submit" name="SubmitForm" value="Submit">
</form>
</body>
</html>
3 Save the page as formpage.cfm within the myapps directory under your Web root
directory.
4 View the form in a browser.
The form appears in the browser.
Remember that you need an action page in order to submit values; you will create
one later in this chapter.
Reviewing the code
The following table describes the highlighted code and its function:.
Code Description
<form action="actionpage.cfm"
method="post">
Gather the information from this form
using the Post method, and do something
with it on the page actionpage.cfm.
<input type="Text" name="FirstName"
size="20" maxlength="35">
Create a text box called FirstName where
users can enter their first name. Make it
20 characters wide, but allow input of up
to 35 characters.
<input type="Text" name="LastName"
size="20" maxlength="35">
Create a text box called LastName where
users can enter their first name. Make it
20 characters wide, but allow input of up
to 35 characters.
<input type="Text" name="Salary"
size="10" maxlength="10">
Create a text box called Salary where
users can enter a salary to look for. Make
it 10 characters wide, and allow input of
up to 10 characters.