# Creating an HTML Insert Form

| To create an insert form:

1. Create a new application page in Studio.
2. Edit the page so that it appears as follows:

       <HTML>
       <HEAD>
           <TITLE>Insert Data Form</TITLE>
       </HEAD>

       <BODY>
       <H2>Insert Data Form</H2>
       <FORM ACTION="insertdata.cfm" METHOD="Post">
           Employee ID:
           <INPUT TYPE="text" NAME="Employee_ID" SIZE="4" MAXLENGTH="4"><BR>
           First Name:
           <INPUT TYPE="text" NAME="FirstName" SIZE="35" MAXLENGTH="50"><BR>
           Last Name:
           <INPUT TYPE="text" NAME="LastName" SIZE="10" MAXLENGTH="10"><BR>
           Department Number:
           <INPUT TYPE="text" NAME="Department_ID" SIZE="4"
       MAXLENGTH="4"><BR>
           Start Date:
           <INPUT TYPE="text" NAME="StartDate" SIZE="16" MAXLENGTH="16"><BR>
           Salary:
           <INPUT TYPE="text" NAME="Salary" SIZE="10" MAXLENGTH="10"><BR>
           Contractor:
           <INPUT TYPE="checkbox" name="Contract" value="Yes"
       checked>Yes<BR><BR>
           <INPUT TYPE="reset" NAME="ResetForm" VALUE="Clear Form">
           <INPUT TYPE="submit" NAME="SubmitForm" VALUE="Insert Data">
       </FORM>
           </BODY>
       </HTML>

3. Save the file as `insertform.cfm` in the `myapps` directory.
4. View `insertform.cfm` in a browser.

## Data Entry Form Notes and Considerations

Creating data entry fields for an HTML form is very simple:

- You need only create the HTML form fields for each database field into which you want to insert data.
- The names of your form fields must be identical to the names of your database fields.
- You can use the full range of HTML input controls, including list boxes, radio buttons, checkboxes, and multi-line text boxes in your forms.
- ColdFusion uses the NAME attribute to map HTML form fields to the corresponding database fields and inserts the data entered by the user into the appropriate database fields.