• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

The Form Page

The form page does not necessarily have to contain ColdFusion code; it can be just a plain old HTML page with an .htm extension. The important bit about the form page is that it sends information to the correct action page. You specify the name of the action page with the ACTION attribute of the HTML <FORM> tag. Let’s take a look at an example.

Listing 5.1. Simple HTML Form, DemoForm1.htm

<HTML> 
  <HEAD> 
      <TITLE>Demo Form</TITLE> 
  </HEAD> 
  <BODY> 
      <H2>Please Give Us Some Feedback.</H2> 
      <!--- identify the action page in the form tag ---> 
      <FORM ACTION="DemoAction1.cfm" METHOD="Post"> 
        Your Name: <INPUT TYPE="Text" NAME="Name" SIZE="30" ><BR> 
        Your Email: <INPUT TYPE="Text" NAME="Email" SIZE="30"><BR> 
        Your Comments:<BR> 
        <TEXTAREA COLS="40" ROWS="5" NAME="Comments"> 
            Hey dude, righteous form. 
        </TEXTAREA><BR> 
        <INPUT TYPE="Submit" VALUE="Send Form"> 
      </FORM> 
  </BODY> 
</HTML>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint