Processing Form Submissions

To demonstrate how to process returned forms, you must create a simple template that echoes the movie title you entered. The template is shown in Listing 12.2.

Listing 12.2. form1_action.cfm—Processing Form Fields
<!---
Name:        form1_action.cfm
Author:      Ben Forta (ben@forta.com)
Description: Introduction to forms
Created:     07/01/07
--->

<html>
<head>
 <title>Learning ColdFusion Forms 1</title>
</head>

<body>

<!--- Display search text --->
<cfoutput>
<strong>Movie title:</strong> #FORM.MovieTitle#
</cfoutput>

</body>
</html>

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.