Another fix for the custom field groups
authorLaury GvR <laury@gaslightmedia.com>
Wed, 8 Aug 2018 20:19:56 +0000 (16:19 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 8 Aug 2018 20:19:56 +0000 (16:19 -0400)
glm-member-db-contacts/views/front/contacts/list.html

index faebdb6..b170296 100644 (file)
@@ -439,14 +439,17 @@ and open the template in the editor.
                                 </div>
 
                         {/if}
+                        {$customFieldGroups = apply_filters('get_glm_custom_grouped_fields','glm-member-db-contacts',$contact.id)}
+
+                        {if $customFieldGroups}
                                 <div class="custom-info section-container">
                                         <h3 class="section-title">
                                             {apply_filters('get_glm_custom_field_tab_name', 'Custom Fields')}
                                         </h3>
                                     <div class="section-data">
-                                        {$customFields = apply_filters('get_glm_custom_fields','glm-member-db-contacts',$contact.id)}
+
                                         {foreach  $customFieldGroups as $customFields}
-                                            {if !empty($customFields[0].field_data)}            
+                                            {if !empty($customFields[0].field_data)}
                                                 {foreach $customFields as $field}
                                                     {if $field.field_data}
                                                         <div class="glm-member-detail-custom-field">
@@ -454,7 +457,7 @@ and open the template in the editor.
                                                                 <span class="glm-member-detail-custom-field-name small-12 medium-5 columns">{$field.field_name}</span>
                                                                 <span class="glm-member-detail-custom-field-data small-12 medium-7 columns">{$field.field_data}</span>
                                                             </div>
-                                                            
+
                                                         </div>
                                                     {/if}
                                                 {/foreach}
@@ -462,6 +465,7 @@ and open the template in the editor.
                                         {/foreach}
                                     </div>
                                 </div>
+                        {/if}
                                 <div class="hide-contact-full-profile">
                                     Hide full profile
                                 </div>