> <select name="parked">
>     <option value="">
>         <cfloop index=i from="1" to="52">
>             <option value="#i# week/year">#i# week/year
>         </cfloop>
> </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?


One way to do this:

<option value="#i# week/year" #iif(CurrentValueVarName is "#i#
week/year",de("selected"),de(""))#>#i# week/year</option>



or, less complicated looking:

<cfif CurrentValueVarName is "#i# week/year">
        <option value="#i# week/year" selected>#i# week/year</option>
<cfelse>
        <option value="#i# week/year">#i# week/year</option>
</cfif>



Hope this helps.

- Sean

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sean Daniels
Manager, Engineering
Marketplace Technologies
[EMAIL PROTECTED]
http://www.dealstream.com
http://www.mergernetwork.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tel: 207.439.6030
cel: 978.764.0779


>
> 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=lists&body=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.

Reply via email to