[Vtigercrm-developers] Right way to fix annoying Search Drop Down?

Adam Heinz amh at metricwise.net
Thu Oct 4 18:52:57 PDT 2012


Have you looked at the code that generates the picklist drop down?  I
always assumed that module_no was first because it's first in the
field sequence and there is no default selection.  Maybe you can just
make a database change?

On Thu, Oct 4, 2012 at 8:01 AM, Alan Lord <alanslists at gmail.com> wrote:
> 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.
>
>
> _______________________________________________
> http://www.vtiger.com/


More information about the vtigercrm-developers mailing list