
140
Chapter 12: Lesson 9: Enabling Database Maintenance
<cfset tripDescription = ''>
<cfset eventTypeIdentifier = #GetEvents.eventType#>
<cfset tripLocation = ''>
<cfset departureDate = ''>
<cfset returnDate = ''>
<cfset price = ''>
<cfset tripLeader = ''>
<cfset photo = ''>
<cfset baseCost = ''>
<cfset numberPeople = ''>
<cfset depositRequired = 'Yes'>
</cfif>
3.
To make the appropriate values appear in the form, insert the code that is highlighted in the
following table:
Note:
If the user clicks the Add button, the values from the currently displayed trip detail appear in
the form; otherwise, all values, except those in the event type field, are blank.
4.
Save the file.
Code Explanation
<TD><cfinput name= "tripName"
maxlength = "50"
size = "50"
required = "Yes"
value="tripName"
message = "Trip name must not be blank">
</TD>
Set the value of the Trip Name to be
blank if the ID is undefined; otherwise,
set the value equal to the Trip Name
that appeared on the Trip Detail page.
<TD><cftextarea name="tripDescription"
required="Yes"
message="Trip description must not be blank.">
value="#tripDescription#"
</cftextarea>
</TD>
Set the value of the Trip Description to
be blank if the ID is undefined;
otherwise, set the value equal to the
Trip Description that appeared on the
Trip Detail page.
<td><cfselect size="1" name="eventType" required="Yes"
message="Type of event must be selected.">
<cfoutput query="GetEvents">
<option value=
"#GetEvents.eventTypeID#">#GetEvents.eventType#
</option>
</cfoutput>
</cfselect>
</td>
Set the value of the Event Type to be
the list of events.
<TD><cfinput size="50" name="tripLocation"
required="Yes"
value="#tripLocation#"
message="Trip location must not be blank.">
</TD>
Set the value of the Trip Location to
be blank if the ID is undefined;
otherwise, set the value equal to the
Trip Location that appeared on the
Trip Detail page.
Содержание COLFUSION MX 7-GETTING STARTED BUILDING COLDFUSION...
Страница 1: ...COLDFUSION MX7 Getting Started Building ColdFusion MX Applications...
Страница 6: ...6 Contents...
Страница 10: ......
Страница 14: ...14 Chapter 1 Introducing ColdFusion MX...
Страница 38: ...38 Chapter 3 Database Fundamentals...
Страница 40: ......
Страница 58: ...58 Chapter 5 Lesson 2 Configuring Your Development Environment...
Страница 70: ...70 Chapter 6 Lesson 3 Retrieving Data...
Страница 84: ...84 Chapter 7 Lesson 4 Building Dynamic Queries...
Страница 96: ...96 Chapter 8 Lesson 5 Creating a Trip Detail Page...
Страница 102: ...102 Chapter 9 Lesson 6 Creating a Main Application Page...