Always add it, rather than checking if it is assiged in the template
}
}
- if (!empty($defaults['gender_id'])) {
- $defaults['gender_display'] = CRM_Core_PseudoConstant::getLabel('CRM_Contact_DAO_Contact', 'gender_id', $defaults['gender_id']);
- }
+ $defaults['gender_display'] = CRM_Core_PseudoConstant::getLabel('CRM_Contact_DAO_Contact', 'gender_id', $defaults['gender_id'] ?? NULL);
$communicationStyle = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'communication_style_id');
if (!empty($communicationStyle)) {
{/if}
<div class="crm-summary-row">
<div class="crm-label">{ts}Gender{/ts}</div>
- <div class="crm-content crm-contact-gender_display">{if !empty($gender_display)}{$gender_display}{/if}</div>
+ <div class="crm-content crm-contact-gender_display">$gender_display}</div>
</div>
<div class="crm-summary-row">