<select name="option1" class="formbox">
<cfloop list="#option1#" index="listItem">
        <option value="#listItem#">#listItem#</option>
</cfloop>
</select>

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 20, 2006 1:27 PM
> To: CF-Talk
> Subject: Can I use replace function on a string to create form drop
box
> options?
> 
> 
> 
> I've got a database field called option1 that contains two colors
> seperated by a comma:  "red,yellow".
> 
> What I'm trying to do is create a drop down form box that takes each
color
> (delineated by the comma) and puts it into it's own
> option value like this:
> 
> <select name="option1">
> <optionvalue="red"> red </option>
> <optionvalue="yellow"> yellow </option>
> </select>
> 
> My first attempts have been with the replace function:
> 
> <cfset color="#Replace("#option1#", ",", "</option>","ALL")#">
> <selectname="option1"class="formbox">
> <optionvalue="#option1#">#size#
> </select>
> 
> However, it appears to be more complicated than that, that getting em
only
> part of the option value line.
> 
> Any suggestions or alternatives I'm not seeing here would be most
> appreciated.
> 
> -jeff
> 
> 
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257613
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to