%= form_for '', url: template_submissions_path(template), html: { class: 'space-y-4', autocomplete: 'off' }, data: { turbo_frame: :_top } do |f| %>
  <% submitters = template.submitters.reject { |e| e['invite_by_uuid'].present? } %>
  
    
      
        
          
          
            <% submitters.each_with_index do |item, index| %>
              
                
                  <% if submitters.size > 1 %>
                    
                  <% end %>
                  
                  
                    ">
                      <%= tag.input type: 'tel', pattern: '^\+[0-9\s\-]+$', oninvalid: "this.value ? this.setCustomValidity('Use internatioanl format: +1xxx...') : ''", oninput: "this.setCustomValidity('')", name: 'submission[1][submitters][][phone]', autocomplete: 'off', class: 'base-input !h-10 w-full', placeholder: t('phone'), required: index.zero?, id: "phone_phone_#{item['uuid']}" %>
                    
                  
                  <% if submitters.size > 1 %>
                    
                      ">
                        " value="<%= (params[:selfsign] && index.zero?) || item['is_requester'] ? current_user.full_name : '' %>" dir="auto" id="phone_name_<%= item['uuid'] %>">
                      
                    
                  <% end %>
                
                <% if submitters.size == 1 %>
                  
                    
                      ">
                        " value="<%= (params[:selfsign] && index.zero?) || item['is_requester'] ? current_user.full_name : '' %>" dir="auto" id="phone_name_<%= item['uuid'] %>">
                      
                    
                  
                <% end %>
              
            <% end %>
          
 
       
     
    <% if params[:selfsign].blank? %>
      
        <%= svg_icon('user_plus', class: 'w-4 h-4 stroke-2') %>
        <%= t('add_new') %>
      
    <% end %>
  
  
    <%= render('submitters_order', f:, template:) if Accounts.can_send_emails?(current_account) %>
    <%= render 'send_sms', f: %>
  
  
    <%= f.button button_title(title: t('add_recipients')), class: 'base-button' %>
  
<% end %>