Hello, I noticed when your in the staff section it auto populates fields based on the SQL database's ost_ticket information. When creating tickets from staff side we added more fields like fax, secondary number, and so on (we dont need clients to give this information when they create tickets) I made it so that it looks for a variable I created such as AFNAME that way it wont try to autopopulate information that was created from the clients side. I modified the scripts a little to the point where I have it auto-populating all this information based on the afname and it works fine. now I know its a little sloppy but thats why I wanted the auto-populate to be under another sql table like ost_customers.
now in the ajax.tickets.php file where it defines the function searchbymail line 39
it goes into the sql and here is the code that I have working now
"$sql='SELECT DISTINCT afname,email,acnum,name,pversion,phone,phone2,fax FROM '.TICKET_TABLE.' WHERE afname LIKE \''.$input.'%\' ORDER BY created LIMIT '.$limit;"
I figured if I changed it from TICKET_TABLE to the one I created CUSTOMERS_TABLE it would work but the auto-populate stops working. Ive been looking for a couple of hours thru codes to find anywhere else where it might define part of the auto-populate feature and have been unsuccesfull. any ideas of getting it to read from CUSTOMERS_TABLE would be appreciated thankyou in advance
btw CUSTOMERS_TABLE is a copy of TICKET_TABLE