Update the forms for attendee
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 28 Feb 2018 17:22:06 +0000 (12:22 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 28 Feb 2018 17:22:06 +0000 (12:22 -0500)
If there's no custom fields for the add attendee then don't output the
Additional Info Needed title.

views/front/registrations/registration.html

index 936daac..6058980 100644 (file)
                     </div>
                 </div>
                 {/literal}{if apply_filters('glm-members-customfields-plugin-active', false)}{literal}
-                <h4>Additional Info Needed</h4>
+                {/literal}{$fid = "glm_reg_customfields_reg_event_attendee_$regEventId"}{literal}
+                {/literal}{if apply_filters('glm-members-customfields-have-fields', false, $fid)}{literal}
+                    <h4>Additional Info Needed</h4>
+                {/literal}{/if}{literal}
                 <form class="attendee-cf-form-new">
                     <div class="attendee-cf-new">
                         {/literal}
-                            {$fid = "glm_reg_customfields_reg_event_attendee_$regEventId"}
                             {apply_filters( 'glm-members-customfields-form-display', '', $fid )}
                         {literal}
                     </div>
                         </div>
                     </div>
                     {/literal}{if apply_filters('glm-members-customfields-plugin-active', false)}{literal}
+                    {/literal}{if apply_filters('glm-members-customfields-have-fields', false, $fid)}{literal}
                         <h4>Additional Info Needed</h4>
+                    {/literal}{/if}{literal}
                         <form class="attendee-cf-form-<%= id %>"><div class="attendee-cf-<%= id %>"></div></form>
                     {/literal}{/if}{literal}
                 </div>