Question
Making a multiple select dynamic
I have a multiple select that I would like to make dynamic. I
have a look table and a query, but I am not sure how to change the
static code into one that pulls the names from the look up table.
The form also is used to update and that is where I am not sure how
to make it both work on the select. Below is my static code:
select
NIC_Integration_ID,NIC_Txt
from
#request.app.DB#.NAR_NIC_Integration
order by NIC_Integration_ID
</cfquery>
<div>select all that apply</div>
<select name="NIC_Int_DataSeries" multiple>
<option value="Supervisory" <cfif #ListValueCountNoCase(NIC_Int_DataSeries, "Supervisory")# IS 1>selected</cfif>>Supervisory</option>
<option value="Financial" <cfif #ListValueCountNoCase(NIC_Int_DataSeries, "Financial")# IS 1>selected</cfif>>Financial</option>
<option value="Structure" <cfif #ListValueCountNoCase(NIC_Int_DataSeries, "Structure")# IS 1>selected</cfif>>Structure</option>
<option value="Documents Profiles"<cfif #ListValueCountNoCase(NIC_Int_DataSeries, "Documents Profiles")# IS 1>selected</cfif>>Documents Documents Profiles</option>
</select>
Thanks,
Shearak
select
NIC_Integration_ID,NIC_Txt
from
#request.app.DB#.NAR_NIC_Integration
order by NIC_Integration_ID
</cfquery>
<div>select all that apply</div>
<select name="NIC_Int_DataSeries" multiple>
<option value="Supervisory" <cfif #ListValueCountNoCase(NIC_Int_DataSeries, "Supervisory")# IS 1>selected</cfif>>Supervisory</option>
<option value="Financial" <cfif #ListValueCountNoCase(NIC_Int_DataSeries, "Financial")# IS 1>selected</cfif>>Financial</option>
<option value="Structure" <cfif #ListValueCountNoCase(NIC_Int_DataSeries, "Structure")# IS 1>selected</cfif>>Structure</option>
<option value="Documents Profiles"<cfif #ListValueCountNoCase(NIC_Int_DataSeries, "Documents Profiles")# IS 1>selected</cfif>>Documents Documents Profiles</option>
</select>
Thanks,
Shearak