Copy link to clipboard
Copied
Here's the code:
<cfinvoke component="Functions"
method="GetAllStewards"
returnVariable="AllStewards"
</cfinvoke>
<cfselect Name="NewSteward"
query="AllStewards"
display="FullName"
value="MemberID"
required="No"
selected=" "
</cfselect>
Here's the problem: The cfselect always "contains" the MemberID value for the first steward in the list.
Here's what I want: If the values in the cfselect are not clicked, I want the value in NewSteward to be blank. How do I do this?
Introduce a blank option, then use the attribute queryPosition to position the items from the query relative to the blank option
<cfselect Name="NewSteward"
query="AllStewards"
display="FullName"
value="MemberID"
required="No"
queryPosition="below">
<option value="your_default_value"></option>
</cfselect>
Copy link to clipboard
Copied
Introduce a blank option, then use the attribute queryPosition to position the items from the query relative to the blank option
<cfselect Name="NewSteward"
query="AllStewards"
display="FullName"
value="MemberID"
required="No"
queryPosition="below">
<option value="your_default_value"></option>
</cfselect>