diff --git a/templates/CRM/Contact/Form/Contact.tpl b/templates/CRM/Contact/Form/Contact.tpl index fe56d71bb914..962359cfab2c 100644 --- a/templates/CRM/Contact/Form/Contact.tpl +++ b/templates/CRM/Contact/Form/Contact.tpl @@ -78,7 +78,7 @@ {foreach from = $editOptions item = "title" key="name"} {if $name eq 'CustomData' } -
{include file="CRM/Contact/Form/Edit/CustomData.tpl"}
+
{include file="CRM/Contact/Form/Edit/CustomData.tpl" isSingleRecordEdit=false}
{else} {include file="CRM/Contact/Form/Edit/$name.tpl"} {/if} diff --git a/templates/CRM/Custom/Form/Edit/CustomData.tpl b/templates/CRM/Custom/Form/Edit/CustomData.tpl index c73d98453e08..8228791b3cfe 100644 --- a/templates/CRM/Custom/Form/Edit/CustomData.tpl +++ b/templates/CRM/Custom/Form/Edit/CustomData.tpl @@ -1,4 +1,4 @@ -{if empty($isSingleRecordEdit) && $cd_edit.is_multiple eq 1 and $cd_edit.table_id and $contactId and !$skipTitle and $cd_edit.style eq 'Inline'} +{if !$isSingleRecordEdit && $cd_edit.is_multiple eq 1 and $cd_edit.table_id and $contactId and !$skipTitle and $cd_edit.style eq 'Inline'} {assign var=tableID value=$cd_edit.table_id} @@ -9,7 +9,7 @@ {if $cd_edit.help_pre}
{$cd_edit.help_pre}
{/if} - +
{foreach from=$cd_edit.fields item=element key=field_id} {if $customDataEntity && $blockId} {* custom data entity combined with blockId tells us we have an entity with mutliple blocks @@ -25,7 +25,7 @@
{if $cd_edit.help_post}
{$cd_edit.help_post}
{/if} -{if empty($isSingleRecordEdit) && $cd_edit.is_multiple and ( ( $cd_edit.max_multiple eq '' ) or ( $cd_edit.max_multiple > 0 and $cd_edit.max_multiple > $cgCount ) ) } +{if !$isSingleRecordEdit && $cd_edit.is_multiple and ( ( $cd_edit.max_multiple eq '' ) or ( $cd_edit.max_multiple > 0 and $cd_edit.max_multiple > $cgCount ) ) } {if $skipTitle} {* We don't yet support adding new records in inline-edit forms *}