[Vtigercrm-developers] Right way to fix annoying Search Drop Down?
Alan Lord
alanslists at gmail.com
Thu Oct 4 05:01:30 PDT 2012
Hi,
We've had a few customers mention that the default selection in the
Search drop down on ListViews is annoying. Especially for Leads,
Contacts and Accounts. They would prefer it to be a name, not the record
No. by default.
I did a bit of digging and added a small mod to the ListViewController
class which takes the "No." field and sticks it at the end of the list
rather the beginning.
public function getBasicSearchFieldInfoList() {
$fields = $this->queryGenerator->getFields();
// Small mod to re-order the Search Drop Down list to put
{Lead,Contact,Account} No. at the end rather than the start
if ( in_array('contact_no', $fields) || in_array('account_no',
$fields) || in_array('lead_no', $fields) ) {
$num = array_shift($fields);
array_push($fields, $num);
}
// End mod
Now I'm not sure if the best way to do it but it seems to work OK.
More information about the vtigercrm-developers
mailing list