I have a simple dynamically populated drop-down on a form page...Code:
<form method="POST" action="search_process.cfm">
<p>State: <input type="text" name="State" size="20">
<p>Focus Area:<select size="1" Name="ls_focus_ID" multiple="yes">
<OPTION SELECTED VALUE="">Choose One
<cfoutput query="focus_areas">
<OPTION VALUE="#ls_focus_ID#">#Focus#
</cfoutput>
</select>
And an action page where I want to display the results of this query. Each group can have multiple "focus areas".
I allow multiples to be selected, but I'm not sure how to deal with the results on the action page. will I have to loop somehow? Action page code below:
<CFQUERY
DATASOURCE="outreach"
NAME="groups_found">
SELECT DISTINCT Organization_1, City, Street_address_1, State, Postal_Code
FROM Main_Table, LS_Details, LS_Focus_Areas
WHERE State = '#Form.State#'
AND Main_Table.LS_ID = LS_Details.LS_ID
AND LS_Details.ls_focus_ID = #Form.ls_focus_ID#
ORDER BY Organization_1
</CFQUERY>
<form method="POST" action="search_process.cfm">
<p>State: <input type="text" name="State" size="20">
<p>Focus Area:<select size="1" Name="ls_focus_ID" multiple="yes">
<OPTION SELECTED VALUE="">Choose One
<cfoutput query="focus_areas">
<OPTION VALUE="#ls_focus_ID#">#Focus#
</cfoutput>
</select>
And an action page where I want to display the results of this query. Each group can have multiple "focus areas".
I allow multiples to be selected, but I'm not sure how to deal with the results on the action page. will I have to loop somehow? Action page code below:
<CFQUERY
DATASOURCE="outreach"
NAME="groups_found">
SELECT DISTINCT Organization_1, City, Street_address_1, State, Postal_Code
FROM Main_Table, LS_Details, LS_Focus_Areas
WHERE State = '#Form.State#'
AND Main_Table.LS_ID = LS_Details.LS_ID
AND LS_Details.ls_focus_ID = #Form.ls_focus_ID#
ORDER BY Organization_1
</CFQUERY>