I have an drop down in an Update form ‘id=”tak_id”’ being populated from an query”takType”. The drop down box has three options “sms, chat, tweet” with three different values”001,002,003”.
The SELECTED value in the field is being repeated twice.How can I make the SELECTED value appear only once?
The code is below
<cfselect name="tak_id" id="tak_id">
<cfoutput query="takType">
<option >select one</option>
<option value="#takType.tak_id#" <cfif takType.tak_id IS tak_id > selected </cfif> >
<cfswitch expression="#takType.tak_id#">
<cfcase value="01">SMS </cfcase>
<cfcase value="02">chat </cfcase>
<cfcase value="03">tweet </cfcase>
</cfswitch>
</option>
<option value="01" >SMS</option>
<option value="02" >chat</option>
<option value="03" >tweet</option>
</cfoutput>
</cfselect>
</td>
</tr>
thanks a lot Fransis