I would highly recommend not using cfform
because it tends to do a lot more harm than good, with that being said you can use an attributeCollection
to get this working.
<cfset stSelect = {
name = 'UrgencyId',
query = 'GetUrgencies',
value = 'id',
display = 'Urgency'
} />
<cfif boxShouldBeDisabled>
<cfset stSelect.disabled = 'disabled' />
</cfif>
<cfselect attributeCollection="#stSelect#">
</cfselect>
You don't specify your ColdFusion version, but the above code should work on CF8 or greater and was tested on CF10.
Not using cfform
your code would look like. It's definitely not as clean looking, but it enables you to not use cfform
<select name="UrgencyId">
<cfloop query="GetUrgencies">
<option value="#GetUrgencies.id#"<cfif issue.UrgencyID EQ GetUrgencies.id> selected="selected"</cfif><cfif shouldbeDisabled> disabled="disabled"</cfif>>#GetUrgencies.Urgency#</option>
</cfloop>
</select>