Programming instructions
Using an HTML form to collect data 101
Using an HTML form to collect data
Based on the data requirements determined in Lesson 1, the following figure shows the
Trip Edit data collection page:
Exercise: view the source and test the Trip Edit page
To view the source and test the Trip Edit data collection form:
1 Open an editor, then locate and open the file tripedit1.cfm in the solutions directory
\cfdocs\getting_started\solutions under your web root directory.
2 Review the HTML source code used to create the Trip Edit page. If you are not
fluent in HTML, the following table explains the use of some of the HTML tags in
the Trip Edit page. For more information on HTML, consult any HTML primer.
Tag Description
Form You create a data entry form by using the form tag. The form tag takes
two tag attributes; for example:
<form action="tripeditaction.cfm" Method= "Post">
Here, the action attribute specifies the name of the ColdFusion file that
the web server will navigate to in response to the form’s submission. The
method attribute specifies how data is returned to the web server. Submit
all ColdFusion forms using the Post method attribute.