function wf_crm_format_contact in Webform CiviCRM Integration 7.3
Same name and namespace in other branches
- 7.5 includes/contact_component.inc \wf_crm_format_contact()
- 7.4 includes/contact_component.inc \wf_crm_format_contact()
Display a contact based on chosen fields
Parameters
array $contact:
array $display_fields:
Return value
bool|string
2 calls to wf_crm_format_contact()
- wf_crm_contact_access in ./
contact_component.inc - Load contact name if user has permission. Else return FALSE.
- wf_crm_contact_search in ./
contact_component.inc - Returns a list of contacts based on component settings.
File
- ./
contact_component.inc, line 731
Code
function wf_crm_format_contact($contact, $display_fields) {
if (!$contact) {
return FALSE;
}
$display = array();
foreach ($display_fields as $field) {
if ($field && !empty($contact[$field])) {
$display[] = $contact[$field];
}
}
return implode(' :: ', $display);
}