<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>
To make the appropriate values appear in the form, insert the code that is highlighted in the
3.
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.
Save the file.
4.
Code
<TD><cfinput name= "tripName"
maxlength = "50"
size = "50"
required = "Yes"
value="tripName"
message = "Trip name must not be blank">
</TD>
<TD><cftextarea name="tripDescription"
required="Yes"
message="Trip description must not be blank.">
value="#tripDescription#"
</cftextarea>
</TD>
<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>
<TD><cfinput size="50" name="tripLocation"
required="Yes"
value="#tripLocation#"
message="Trip location must not be blank.">
</TD>
140
Chapter 12: Lesson 9: Enabling Database Maintenance
Explanation
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.
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.
Set the value of the Event Type to be
the list of events.
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.
Need help?
Do you have a question about the COLFUSION MX 7-GETTING STARTED BUILDING COLDFUSION MX and is the answer not in the manual?
Questions and answers