I'm in edit mode in my form, passing and URL.id value which is a product id.  
I'm trying to get the atribId values: 17, 19, 22, 61, 74 to populate my 
multiple select box as selected, but it's only working for the first value 17.

<CFQUERY name="sizes" datasource="#datasource#">
select name, id
from giftAttributes
</CFQUERY>

<!--- I N   E D I T  M O D E --->
<cfif ISDEFINED ("url.Id")>
<CFQUERY name="url_sizes" datasource="#datasource#">
select gftId    atribId
from giftsGiftsAttributes
where giftid = #URL.id#
</CFQUERY>
</cfif>
<!--- I N   E D I T  M O D E --->

RESULTS
gftId   atribId *
80      17
80      19
80      22
80      61
80      74

atribId values: 17, 19, 22, 61, 74


<select name="size_color" id="size_color" multiple="multiple" size="10">
<CFOUTPUT query="sizes">
<option value="#id#" <CFIF ISDEFINED ("URL.ID") AND 
listFind(url_sizes.attributeId, id)> selected="selected" </CFIF>>#name#</option>
</CFOUTPUT>
      </select> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333585
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to