Copy link to clipboard
Copied
Hi,
I have the following code as part of an entry form:
<td><span class="style7">PURCHASE INITATOR</span></td>
<td width="183" class="style7"><cfselect name="EMPLOYEE">
<cfoutput query="EMPLOYEE">
<option value="#EMPLOYEE.ID_NUMBER#">#EMPLOYEE.PURCHASE_INITIATOR#</option>
</cfoutput>
</cfselect></td>
Is there a way that I can make the drop down menu show a default (initial) value?
I want it to automatically display "NONE" as the default viewed entry for the drop down.
"NONE" is the value of EMPLOYEE.PURCHASE_INITIATOR that is indexed to EMPLOYEE.ID_NUMBER value "21"
Any ideas?
Thank you in advance for your help !
Eric Dahlenburg
Copy link to clipboard
Copied
<td><span class="style7">PURCHASE INITATOR</span></td>
<td width="183" class="style7"><cfselect name="EMPLOYEE">
<cfoutput query="EMPLOYEE">
<option value="#EMPLOYEE.ID_NUMBER#" <cfif employee.id_number EQ 21>selected="selected"</cfif>>#EMPLOYEE.PURCHASE_INITIATOR#</option>
</cfoutput>
</cfselect>
</td>
That is one simple way.
Copy link to clipboard
Copied
Wow,
<cfif UNIT.UNIT_ID EQ 12>selected="selected"</cfif>
Great Idea. I knew there has to be some way of selecting, but couldn't find it in my searches.
Thanks for bailing me out again,
Eric Dahlenburg