only showing custom fields that have values
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 6 Nov 2017 20:01:52 +0000 (15:01 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 6 Nov 2017 20:01:52 +0000 (15:01 -0500)
looping all custom fields that have values and only displaying the ones that do in
the member detail view template

glm-member-db/views/front/members/detail.html

index 2d78388..672e1c6 100644 (file)
                         <div id="glm-member-detail-meeting" >
                             {$customFields = apply_filters('get_glm_custom_fields','glm-member-db',$member.id)}
                             {foreach $customFields as $field}
+                                {if $field.field_data}
                                     <div class="glm-member-detail-custom-field">
                                         <div class="row">
                                             <span class="glm-member-detail-custom-field-name small-12 medium-5 columns" >{$field.field_name}</span>
                                         </div>
                                         
                                     </div>
+                                {/if}
                             {/foreach}
                         </div>
                         <div class="glm-member-detail-sub-data-links row">