Snippet:
As you can see, I'm populating that select with the results of a query. I wanted to have a value selected by default. That's what the CFIF was put there for. I wanted the selected value to default to something specific when that value in Request.qSecCod es.org_code is the same as in Variables.oSurv ey.secCode.
This was kind of hard to explain. I hope I'm clear enough.
Code:
<form> <select name="secCode" id="secCode"> <cfloop query="Request.qSecCodes"> <option value="#Request.qSecCodes.org_name#" <cfif (Request.qSecCodes.org_code EQ Variables.oSurvey.secCode)>selected="true"</cfif>>#Request.qSecCodes.org_name#</option> </cfloop> </select> </form>
This was kind of hard to explain. I hope I'm clear enough.
Comment