2 Replies Latest reply on Apr 11, 2008 8:10 AM by sirtcarlos

    displaying cfselect option selected

      I have a CF form with a <cfselect> dropdown menu for a user to select an option. This is put into the db without a problem. However, I have another page that allows the user to edit the information for the record, on which all the data for that record is filled into the form fields. I tried putting a simple (but long)
      <cfif entry.column IS "thevalue">
      <option value="thevalue" selected="selected">The Value</option>
      <option value="thevalue">The Value</option>

      and then I repeat this for all the possible options in the dropdown menu. Yet when the user goes to the edit form page, the first option is the option that is always selected (basically, it is NOT selecting the appropriate option). anyone see an error in my thinking or know a simpler way to make the selected="selected" value set without running many (many) cfif statements?