Hey Everyone,
Well this is probably a pretty easy question, but for some reason i just can not figure it out.
What i am trying to do is redisplay what was entered previously. I have figured everything out except for this drop down box.
Right now i am using one cfoutput query to display in the drop down box the values for it that are in the database. However, now i created a second query to display what was entered previously. The thing is i know i can't use 2 cfquery outputs around the same drop down box an so i was wondering how would i make the drop down box still have the options in the drop down box but also show what was previously selected?
here is what i have
- this gets the values for the status
-
<cfquery name="getstatus" datasource="CustomerSupport">
-
usp_CS_getTicketStatuses
-
</cfquery>
-
-
this is to display what was selected
-
<cfquery name="ticket" datasource="CustomerSupport">
-
SELECT pk_ticketID,title,priority,
-
status,cost_center,fk_customer_number,
-
customer_company,customer_Fname,customer_Lname,
-
customer_add1,customer_city,customer_state,
-
customer_zip,customer_email,customer_pri_phone,
-
customer_sec_phone,customer_notes,htpp
-
FROM dbo.tbl_CS_ticketMaster
-
</cfquery>
-
-
<select name="status">
-
<option value="" selected>Make A Selection</option
-
>
-
<cfoutput query="getstatus"><option value="#pk_status#"<cfif #pk_status# is #status#>selected</cfif>>#status_display#</option>
-
</cfoutput>
-
Thank you in advance,
Rach