Oz Coruhlu
03/21/2022, 8:33 PM<cfform class="searchform" method="post" role="search" action="/gcrm/dashboard/" >
<div class="input-group">
<cfinput name="name" type="text" autosuggest="cfc:autosuggest.findContact({cfautosuggestvalue})" matchContains="true" class="form-control" placeholder="Search Client(Phone/Name)"/>
<span class="input-group-btn">
<button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button>
</span>
<input type="hidden" name="searchit" value="yes" />
</div>
</cfform>
Michael Schmidt
03/21/2022, 8:37 PMOz Coruhlu
03/21/2022, 8:38 PMOz Coruhlu
03/21/2022, 8:41 PMMichael Schmidt
03/21/2022, 8:42 PMOz Coruhlu
03/21/2022, 8:43 PMOz Coruhlu
03/21/2022, 8:48 PMMichael Schmidt
03/21/2022, 8:56 PMOz Coruhlu
03/21/2022, 8:58 PMMichael Schmidt
03/21/2022, 8:58 PMOz Coruhlu
03/21/2022, 9:42 PMAdam Cameron
Oz Coruhlu
03/21/2022, 10:47 PMAdam Cameron
Oz Coruhlu
03/21/2022, 10:49 PMAdam Cameron
Oz Coruhlu
03/21/2022, 10:49 PMAdam Cameron
Oz Coruhlu
03/21/2022, 10:51 PMAdam Cameron
name
, phone
and email
.Oz Coruhlu
03/21/2022, 10:51 PMOz Coruhlu
03/21/2022, 10:51 PM<cfcomponent output="false">
<!--- Lookup used for auto suggest --->
<cffunction name="findContact" access="remote" returntype="string">
<cfargument name="search" type="string" required="false" default="">
<!--- Define variables --->
<cfset var local = {} />
<!--- Query Location Table --->
<cfquery name="local.query" datasource="saspcrm" >
select name as s
from clients
where name like '%#ucase(arguments.search)#%'
UNION ALL
select phone as s
from clients
where phone like '%#ucase(arguments.search)#%'
UNION ALL
select email as s
from clients
where email like '%#ucase(arguments.search)#%'
</cfquery>
<!--- And return it as a List --->
<cfreturn valueList(local.query.s)>
</cffunction>
</cfcomponent>
Oz Coruhlu
03/21/2022, 10:52 PM<cfform class="searchform" method="post" role="search" action="/gcrm/dashboard/" >
<div class="input-group">
<cfinput name="name" type="text" autosuggest="cfc:autosuggest.findContact({cfautosuggestvalue})" matchContains="true" class="form-control" placeholder="Search Client"/>
<span class="input-group-btn">
<button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button>
</span>
<input type="hidden" name="searchit" value="yes" />
</div>
</cfform>
Adam Cameron
Adam Cameron
Oz Coruhlu
03/21/2022, 10:53 PMAdam Cameron
Adam Cameron
Oz Coruhlu
03/21/2022, 10:55 PMAdam Cameron
55555
, what is the value that comes back from the AJAX req?Adam Cameron
Oz Coruhlu
03/21/2022, 10:59 PMAdam Cameron
Adam Cameron
Oz Coruhlu
03/21/2022, 11:01 PMAdam Cameron
Adam Cameron
Abhijit Mukherjee
03/23/2022, 3:49 AMAbhijit Mukherjee
03/23/2022, 3:51 AM