<%= semantic_form_for 'latencies', url: user_latencies_admin_users_path, html: {id: 'user_latencies_form'} do |f| %>
  <%= f.inputs :name => 'Select user', :class => 'inputs' do %>
    <%= f.input :my_user, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'My user name/email' %>
    <%= f.input :my_user_id, as: :hidden %>
    <%= f.input :my_public_ip, label: 'My user public IP' %>
  <% end %>
  <%= f.inputs :name => 'Select other users', :class => 'inputs' do %>
    <%= f.input :user_1, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'Other user 1' %>
    <%= f.input :user_1_id, as: :hidden %>
    <%= f.input :user_2, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'Other user 2', required: false %>
    <%= f.input :user_2_id, as: :hidden %>
    <%= f.input :user_3, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'Other user 3', required: false %>
    <%= f.input :user_3_id, as: :hidden %>
    <%= f.input :user_4, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'Other user 4', required: false %>
    <%= f.input :user_4_id, as: :hidden %>
    <%= f.input :user_5, :as => :autocomplete, url: autocomplete_user_email_admin_users_path, label: 'Other user 5', required: false %>
    <%= f.input :user_5_id, as: :hidden %>
  <% end %>
  <%= f.actions do %>
    <%= f.action :submit, :as => :button, label: 'Submit' %>
    <%= f.action :cancel, :as => :link, label: 'Cancel' %>
  <% end %>
<% end %>