Is it possible to set a select inputs default value based on a value returned by a database query? Where below getFormData.color_it = 'RAL7035TXT'
<cfquery name="getFormData" datasource="RC">
SELECT *
FROM RFQ_Data
WHERE form_ID = <cfqueryparam value="#ARGUMENTS.rfqID#">
</cfquery>
<select name="color_it">
<option value="RAL9005TXT">RAL9005TXT </option>
<option value="RAL7035TXT">RAL7035TXT </option>
<option value="other">Other </option>
</select>
The result I am looking for would change the select so that the option with the value RAL7035TXT would be on top so it is the default. (see below)
<select name="color_it">
<option value="RAL7035TXT">RAL7035TXT </option>
<option value="RAL9005TXT">RAL9005TXT </option>
<option value="other">Other </option>
</select>
Would this have to be done with with a lot of if statements?
Looks like my question was answered in one of my other questions: ColdFusion how to set form input values from the results of a cfquery?