<%= form_with(model: @customer, local: true) do |form| %>
<% if @customer.errors.any? %>
<%= pluralize(@customer.errors.count, "error") %> prohibited this customer from being saved:
<% @customer.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% end %>
<%= form.hidden_field :user_id %>
<%# if @customer_type.nil? %>
<%= form.label :customer_type_id %>
<%= form.select :customer_type_id, CustomerType.all.collect {|s| [s.name, s.id]}, {:prompt => 'Select Type'}, data: { remote: true, url: url_for( action: :form_by_customer_type)}, :class => 'form-control' %>
<%# end %>
What is your Name?
<%= form.label :firstname, :class=>"lead" %>
<%= form.text_field :firstname, :class=>"form-control" %>
<%= form.label :lastname, :class=>"lead" %>
<%= form.text_field :lastname, :class=>"form-control" %>
<%= form.label :gender, :class=>"lead" %>
<%= form.radio_button :gender, 'male' %> Male <%= form.radio_button :gender, 'female' %> Female
How can we contact You?
<%= form.label :mobile_1, :class=>"lead" %>
<%= form.text_field :mobile_1, :class=>"form-control" %>
<%= form.label :email, :class=>"lead" %>
<%= form.email_field :email, :class=>"form-control" %>
Who is your Employer?
<%= form.label :employer_name, :class=>"lead" %>
<%= form.text_field :employer_name, :class=>"form-control" %>
<%= form.label :employment_type, :class=>"lead" %>
<%= form.select :employment_type, ["Permanent","Contract","Attachee"], {:prompt => "Select Type"}, :class=>"form-control" %>
<%= form.label :employer_phone, :class=>"lead" %>
<%= form.text_field :employer_phone, :class=>"form-control" %>
<%= submit_tag "Submit", :class => "text-capitalize s-btn s-btn--md s-btn--primary-bg g-radius--50 g-padding-x-70--xs g-margin-b-20--xs" %>
<% end %>