// Hack to add options not retrieved by getfields
// This list could go on and on, but it would be better to fix getfields
$options = array(
- 'group' => 'contact',
- 'tag' => 'contact',
- 'country' => 'contact',
- 'state_province' => 'contact',
+ 'group' => 'group_contact',
+ 'tag' => 'entity_tag',
+ 'country' => 'address',
+ 'state_province' => 'address',
'gender' => 'contact',
'world_region' => 'contact',
'individual_prefix' => 'contact',
'action' => 'create',
));
$meta = $result['values'];
+ if (!isset($meta[$fieldName]['name']) && isset($meta[$fieldName . '_id'])) {
+ $fieldName = $fieldName . '_id';
+ }
if (isset($meta[$fieldName])) {
return $meta[$fieldName]['name'];
}