Update Fields.tpl
authorKurund Jalmi <kurundjalmi@thirdsectordesign.org>
Wed, 24 Nov 2021 16:00:14 +0000 (16:00 +0000)
committerGitHub <noreply@github.com>
Wed, 24 Nov 2021 16:00:14 +0000 (16:00 +0000)
templates/CRM/UF/Form/Fields.tpl

index 1370f593c5359f9194e831c0e7bacc60bc6d0140..3492371194fed1924ab07a14fedc2cc5cadd7dd6 100644 (file)
@@ -6,8 +6,10 @@
   {assign var=profileFieldName value=$field.name}
   {if $prefix}
     {assign var="formElement" value=$form.$prefix.$profileFieldName}
+    {assign var="rowIdentifier" value=$form.$prefix.$profileFieldName.id}
   {else}
     {assign var="formElement" value=$form.$profileFieldName}
+    {assign var="rowIdentifier" value=$field.name}
   {/if}
 
   {if $field.groupTitle != $fieldset}
   {elseif $profileFieldName}
     {* Show explanatory text for field if not in 'view' or 'preview' modes *}
     {if $field.help_pre && $action neq 4 && $action neq 1028}
-      <div class="crm-section helprow-{$profileFieldName}-section helprow-pre" id="helprow-{$profileFieldName}">
+      <div class="crm-section helprow-{$profileFieldName}-section helprow-pre" id="helprow-{$rowIdentifier}">
         <div class="content description">{$field.help_pre}</div>
       </div>
     {/if}
     {if $field.options_per_line != 0}
-      <div class="crm-section editrow_{$profileFieldName}-section form-item" id="editrow-{$profileFieldName}">
+      <div class="crm-section editrow_{$profileFieldName}-section form-item" id="editrow-{$rowIdentifier}">
         <div class="label option-label">{$formElement.label}</div>
         <div class="content 3">
 
@@ -77,7 +79,7 @@
         <div class="clear"></div>
       </div>
     {else}
-      <div class="crm-section editrow_{$profileFieldName}-section form-item" id="editrow-{$profileFieldName}">
+      <div class="crm-section editrow_{$profileFieldName}-section form-item" id="editrow-{$rowIdentifier}">
         <div class="label">
           {$formElement.label}
         </div>
     {/if}
     {* Show explanatory text for field if not in 'view' or 'preview' modes *}
     {if $field.help_post && $action neq 4 && $action neq 1028}
-      <div class="crm-section helprow-{$profileFieldName}-section helprow-post" id="helprow-{$profileFieldName}">
+      <div class="crm-section helprow-{$profileFieldName}-section helprow-post" id="helprow-{$rowIdentifier}">
         <div class="content description">{$field.help_post}</div>
       </div>
     {/if}