5 Replies Latest reply on Feb 2, 2013 3:24 AM by NatheManning

    Dynamically setting an option as selected in cfselect

    NatheManning Level 1



      I have a cfselect that is defined as such:



      <cfselect name="ScheduledFollowup" >

      <option value=""></option>

      <cfloop index="fol" from="0" to="50">

        <option value="<cfoutput>#fol#</cfoutput>>






      What I need to do is insert a "selected" attribute on the option that matches a value retrieved in an earlier query.  I have tried imbedding a <cfif> statement but that doesn't work.


      Any ideas?