Commit 764b0a35 authored by jaapjansma's avatar jaapjansma

also retrieve custom values for a contact.

parent 282c9ed3
......@@ -25,6 +25,12 @@ class ContactDataById extends AbstractAction {
foreach($contact as $field => $value) {
$output->setParameter($field, $value);
// Get custom data
$custom_data = civicrm_api3('CustomValue', 'get', array('entity_id' => $parameters->getParameter('contact_id'), 'entity_table' => 'civicrm_contact'));
foreach($custom_data['values'] as $custom) {
$output->setParameter('custom_'.$custom['id'], $custom['latest']);
......@@ -93,8 +93,8 @@ class CreateUpdateIndividual extends AbstractAction {
$contactIdSpec->setDescription(E::ts('Leave empty to create a new Individual'));
$spec = new SpecificationBag(array(
new Specification('first_name', 'String', E::ts('First name'), true),
new Specification('last_name', 'String', E::ts('Last name'), true),
new Specification('first_name', 'String', E::ts('First name'), false),
new Specification('last_name', 'String', E::ts('Last name'), false),
new Specification('middle_name', 'String', E::ts('Middle name'), false),
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment