What I like doing with commonly used selects is making them custom tags.
The code would look something like this:
<cfparam name="ATTRIBUTES.selected" default="">
<cfoutput>
<select name="parked">
<option value="">
<cfloop index=i from="1" to="52">
<option value="#i# week/year" <cfif ATTRIBUTES.selected IS "#i#
week/year"> selected</cfif>>#i# week/year</option>
</cfloop>
</select>
You call the tag like this:
<cf__selectTag selected="#query.parked#">
You don't have to do this as a custom tag, but for commonly used selects,
it does neaten up the code considerably.
HTH!
Sharon
At 08:24 AM 6/27/2000 -0600, Erika Foster wrote:
>I am populating a select input field with a <cfloop>
>
><select name="parked">
></select>
>
>That's all working. This form is also an edit form if a record already
>exists for this facility. How do I pre-select the value that is in the
>database for that record from within the loop?
>
>Thanks,
>
>
>Erika Foster
>engineering-environmental Management
>Applications Developer
>(505) 866-1654
>[EMAIL PROTECTED]
>
>---------------------------------------------------------------------------
---
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.