Suppose one wants to modify the popup search window that appears when one clicks the Select button in the Contacts subpanel or in general, when relating a record to a contact, e.g. a Note.
Some common customization needs include:
- Adding or removing columns to the ListView
- Adding or removing search fields
To modify the popup search window to apply such customizations:
- Navigate to /modules/Contacts/metadata and locate the file popupdefs.php
- Copy popupdefs.php to /custom/modules/Contacts/metadata. (If the folder doesn't exist, create it.)
- Open popupdefs.php from /custom/modules/Contacts/metadata using a text editor
Taking a close look at popupdefs.php will reveal two areas of importance pertinent to our example.
The listviewdefs array is used to define the list of fields displayed within the ListView of the popup search window. In a very similar manner, the searchdefs array is used to define the fields that appear in the search area of the popup.
The listviewdefs array is used to define the list of fields displayed within the ListView of the popup search window. In a very similar manner, the searchdefs array is used to define the fields that appear in the search area of the popup.
Changes to either of those arrays will modify the popup search window.
NOTE: It may be necessary to clear /cache/modules/Contacts for the changes to take effect.


