Hi,
I have a Multi-Select Option Box that is correctly listing all values as well as the selected values within the multi select box.
Image may be NSFW.
Clik here to view.
However, as you can see, the items are duplicated in the list, with both selected items and the available option values both showing. Instead, I'd like to show the full list of values, with the ones that are selected without any duplicates, like this instead:
Image may be NSFW.
Clik here to view.
<cfset lstFinds = Recordset1.OfficeServed>
<cfoutput><SELECT NAME="OfficeServed" size="10" multiple class="VBlack10" ID="OfficeServed" >
<cfloop list="#lstFinds#" index="k" delimiters=",">
<option value="#k#"
<cfif listfindnocase(ValueList(RS_location.location), k)>
selected="selected"
</cfif>>#k#
</option>
</cfloop>
<CFLOOP QUERY="RS_location">
<OPTION VALUE="<cfoutput>#RS_location.location#</cfoutput>"><CFOUTPUT>#RS_location.location#</CFO UTPUT></OPTION>
</CFLOOP>
</SELECT></cfoutput>
Thanks!
John