home *** CD-ROM | disk | FTP | other *** search
- <!--- This template allows the user to provide information about
- a new employee, and passes the data to InsertAction.cfm, which
- adds the data to the database --->
-
- <CFINCLUDE TEMPLATE="_header.cfm">
-
- <!--- This fetches the names and ID's of the departments, which will
- allow us to create a drop-down box --->
- <CFQUERY DATASOURCE="CFexamples" NAME="GetDepartments">
- SELECT * FROM EmpDepartments
- ORDER BY DepartmentName
- </CFQUERY>
-
- <TR>
- <TD WIDTH=100 ALIGN="RIGHT" VALIGN="TOP" HEIGHT="150"> </TD>
-
- <TD VALIGN="TOP">
-
- <CFFORM ACTION="InsertAction.cfm" METHOD="POST">
-
- <FONT FACE="Helvetica" SIZE="-1">
-
- <P>First Name<BR>
- <CFINPUT TYPE="TEXT" NAME="FirstName" REQUIRED="YES" MESSAGE="You must enter a first name."></P>
-
- <P>Last Name<BR>
- <CFINPUT TYPE="TEXT" NAME="LastName" REQUIRED="YES" MESSAGE="You must enter a last name."></P>
-
- <P>Title<BR>
- <INPUT TYPE="TEXT" NAME="Title"></P>
-
- <P>Department<BR>
- <SELECT NAME="DepartmentID">
- <CFOUTPUT QUERY="GetDepartments">
- <OPTION VALUE="#DepartmentID#">
- #DepartmentName#
- </CFOUTPUT>
- </SELECT></P>
-
- <P><INPUT TYPE="CHECKBOX" NAME="Temporary">Temporary</P>
-
- <P>E-mail<BR>
- <INPUT TYPE="TEXT" NAME="Email"></P>
-
- <P>Phone<BR>
- <INPUT TYPE="TEXT" NAME="Phone"></P>
-
- <P>Start Date<BR>
- <CFINPUT TYPE="TEXT" NAME="StartDate" VALIDATE="date" MESSAGE="Please enter a valid start date."></P>
-
- <P>Personal Information<BR>
- <TEXTAREA NAME="personal" COLS="25" ROWS="5"></TEXTAREA>
-
- <P><INPUT TYPE="SUBMIT" VALUE="Add Employee"></P>
-
- </FONT>
-
- </CFFORM>
-
- </TD>
-
- <TD WIDTH=100 ALIGN="RIGHT" VALIGN="TOP" HEIGHT="150"> </TD>
-
- </TR>
-
- <TR>
- <TD HEIGHT="35" COLSPAN="3"> </TD>
- </TR>
-
- </TABLE>
-
- <!--- Close the document --->
- <CFINCLUDE TEMPLATE="_footer.cfm">