Link to home
Start Free TrialLog in
Avatar of MFredin
MFredinFlag for United States of America

asked on

Add blank record to bound cfselect

I'm trying to figure out a way to return the getSaleBuyers4cfselect query with a black record in case the user wants to leave it blank.
<cfselect name="sale_buyer_id" id="sale_buyer_id" size="1" bind="cfc:lots.addWindow.getSaleBuyers4cfselect()" bindonload="true" display="sale_buyer_Name" value="sale_buyer_id" />
 
 
<!--- Sale Buyers CFC to fill the cfselect query --->
<cffunction name="getSaleBuyers4cfselect" access="remote" returntype="query" output="false">
<cfset var qGetSaleBuyers="">
 
<cfquery name="qGetSaleBuyers" datasource="#request.dsn#">
SELECT sale_buyer_id, sale_buyer_name
FROM sale_buyer
ORDER BY sale_buyer_name
</cfquery>
 
<cfreturn qGetSaleBuyers />
</cffunction>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of azadisaryev
azadisaryev
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MFredin

ASKER

Thanks again Azadi! Perfect!