How to search in more fields (third party search)

Hi,

I use the search bar a lot, and I would specifically like the search to also search the fields of phone number and place (address) - this would be really helpful.
I have the impression that that is adjustable, but I just do not know how or where in the settings I can do this.

Now the search is limited to company name, customer number, VAT number, professional ID;s and so I would like to add phone number and place to that search list.
How can I do this.

thank you.

Hi,

Could someone please look into this? Thank you!

To expand the Third Party search to include phone numbers, you’ll need to edit /htdocs/societe/list.php

Around line 128 you’ll find

's.email'=>"EMail",

After that line add this line exactly as shown.

's.phone'=>"Phone",

To expand the Contacts search to include phone numbers, you’ll need to edit /htdocs/contact/list.php

Around 131 you’ll find

'p.email'=>'EMail',
After that line add this line exactly as shown.

'p.phone'=>'Phone',

Now. Because wildcards ( ) # - etc. affect searches, you’ll have to play around (start with the last 4 digits) until you find a way to find works

You can improve other searches as well including Complimentary attributes with other modules too. Just find the list.php that you wish to modify.

And lastly, if you upgrade Dolibarr, you’ll need to re-enter these modifications so keep them somewhere you’ll remember them like list.txt in their respective folders.

1 Like

This worked perfect! thank you