*/
public static function setDefaultValues(&$defaults, &$form) {
$addressValues = [];
+ // Actual values will be assigned to these below if there are some.
+ $form->assign('masterAddress');
+ $form->assign('sharedAddresses', []);
if (isset($defaults['address']) && is_array($defaults['address']) &&
!CRM_Utils_System::isNull($defaults['address'])
) {
<div id="Address_Block_{$blockId}" {if $className eq 'CRM_Contact_Form_Contact'} class="boxBlock crm-edit-address-block crm-address_{$blockId}"{/if}>
{if $blockId gt 1}<fieldset><legend>{ts}Supplemental Address{/ts}</legend>{/if}
<table class="form-layout-compressed crm-edit-address-form">
- {if isset($masterAddress) && $masterAddress.$blockId gt 0 }
+ {if $masterAddress && $masterAddress.$blockId gt 0 }
<tr><td><div class="message status">{icon icon="fa-info-circle"}{/icon} {ts 1=$masterAddress.$blockId}This address is shared with %1 contact record(s). Modifying this address will automatically update the shared address for these contacts.{/ts}</div></td></tr>
{/if}