This documentation refers to CiviCRM 4.1, the current stable version.

Skip to end of metadata
Go to start of metadata


Documentation Search


CiviCRM 4.1 Documentation

Developer Resources


CiviCRM books!

Make sure to check out our Online User/Administrator and Developer Guides! You can also support this project by ordering a hard copy.

Or support us by buying an eBook or hard copy of Using CiviCRM from Packt Publishing.

Search on the name, group, or tag of an Individual contact type, and list the results with the Name and Internal Contact ID for each Individual's Household. Does not return records for Individuals who are not members of a Household.

Usage: Add Households to a group or tag instead of (or in addition to) the Individuals that belong to the Household. You can export the search results in csv format, and then import them again, this time mapping the Household ID to Internal Contact ID during the import. You can then perform the usual operations on the search result: add to group, remove from group, tag, untag, etc.

Search on Name, Group and Tag, and display the results as:

  • Contact ID (Internal Contact ID for Individual)
  • Sort Name
  • Display Name
  • Household ID (Internal Contact ID for Household)
  • Household Name
  • Relationship Type

Relationship Type is not really necessary in the search results. It is hard-coded to 7 in the php file. It is included to verify that the records returned do indeed have the required relationship

This custom search is based on the existing 'EmployerListing.php' custom search. It has been tested on CiviCRM 2.2.2, running on Drupal 6.1.3.

How to use: Put the code below into a file called IndividualHousehold.php in CRM/Contact/Form/Search/Custom.
Then set it up in Administer CiviCRM -> Manage Custom Searches.

Custom Search Path: CRM_Contact_Form_Search_Custom_IndividualHousehold
Search Title: List Household for Individuals