System information

Exercise 6: Inserting values in the edit form 141
<TD><cfinput name="departureDate"
size="10"
required="Yes"
validate="date"
value="#departureDate#"
message="Departure date must be a valid date.">
</TD>
Set the value of the Departure Date to
be blank if the ID is undefined;
otherwise, set the value equal to the
Departure Date that appeared on the
Trip Detail page.
<TD><cfinput name="returnDate"
size="10"
required="Yes"
validate="date"
value="#returnDate#"
message="Return date must be a valid date.">
</TD>
Set the value of the Return Date to be
blank if the ID is undefined; otherwise,
set the value equal to the Return Date
that appeared on the Trip Detail page.
<TD><cfinput name="numberPeople"
size="6"
required="Yes"
validate="integer"
value="#numberPeople#"
message="The number of people field must be a
number and cannot be blank.">
</TD>
Set the value of the Number of People
to be blank if the ID is undefined;
otherwise, set the value equal to the
Number of People that appeared on
the Trip Detail page.
<TD><cfinput name="price"
size="10"
required="Yes"
validate="integer"
value="#price#"
message="Price is required and must be numeric.">
</TD>
Set the value of the Price to be blank if
the ID is undefined; otherwise, set the
value equal to the Price that appeared
on the Trip Detail page.
<TD><cfinput name="baseCost"
size="10"
required="Yes"
validate="integer"
value="#baseCost#"
message="Base cost is required and must be
numeric.">
</TD>
Set the value of the Base Cost to be
blank if the ID is undefined; otherwise,
set the value equal to the Base Cost
that appeared on the Trip Detail page.
<TD><cfinput name="depositRequired"
type="checkbox"
value="#depositRequired#" >
</TD>
Set the value of the Deposit Required
to be “Yes” if the ID is undefined;
otherwise, set the value equal to the
Deposit Required that appeared on
the Trip Detail page.
<TD><cfinput name="tripLeader"
maxlength="50" size="50"
required="Yes"
value="#tripLeader#"
message="A trip leader must be specified."></TD>
Set the value of the Trip Leader to be
blank if the ID is undefined; otherwise,
set the value equal to the Trip Leader
that appeared on the Trip Detail page.
<TD><cfinput name="photo"
maxlength="50" size="50"
required="Yes"
value="#photo#"
message="Valid photo file name must be specified.">
</TD>
Set the value of the Photo to be blank
if the ID is undefined; otherwise, set
the value equal to the Photo that
appeared on the Trip Detail page.
Code Explanation