System information

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.