sglee
asked on
CFSELECT in Coldfusion
I have order form page with following select statement. Once the user selects the frequency (in this case, "Fill-In Order" and click [Order Preview] page, it shows the selected Frequency in drop-down menu format, but it fails to list all other choices. I like to be able display what the user selected plus the rest of the options from the table so that users can still make the change if they change their mind in Order Preview page.
--- OrderForm.cfm ---
<CFFORM ACTION="PreviewOrder.cfm">
<SELECT NAME="Frequency1">
<OPTION VALUE="0"></OPTION>
<CFOUTPUT query="GetFrequency">
<OPTION VALUE="#ID#">#Frequency#</
</CFOUTPUT>
</SELECT>
--- PreviewOrder.cfm ---
<CFQUERY NAME="GetFrequency" datasource="Order">
SELECT *
FROM Frequency
WHERE ID = #Form.Frequency1#
</CFQUERY>
<CFSELECT NAME="Frequency1"
query="GetFrequency"
selected="#GetFrequency.ID
VALUE ="ID" DISPLAY="Frequency">
</CFSELECT>
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
That was it. Thank you for your help.