This content has been marked as final. Show 5 replies
Are you getting your cfselect values from a query? If so, use the query attribute of the cfselect tag.
You'll also want to add 'value' and 'display' attributes if the cfselect is query-driven.
Hi guys thanks for your help sorry I should have said that this cfselect does not get the values from a query but I will try that with my other cfselect that does. What do I need to do different if the values are hard coded?
Ah. Then the 'selected' attribute of the cfselect tag is meaningless -- strip it out. I take it you're generating a number of <option> tags, then? If that's the case, you'd do this:
<option value="theVal" <cfif theVal eq hear_about_us>selected="selected">option text</option>
plain ol' HTML to the rescue, eh?
Ah yes brilliant point now I feel slightly stupid.