<%= render partial: 'shared/form_model_errors', locals: { obj: candidate } %> <%= form_for candidate, url: action, method: :post do |form| %>
<%= form.label :name, "Candidate name" %> <%= form.text_field :name %>
<%= form.label :email, "Candidate email" %> <%= form.email_field :email %>
<%= form.label :experience, "Years of experience" %> <%= form.select :experience, experience_options(candidate.experience), include_blank: false %>
<%= form.label :project, "Client or project" %> <%= form.text_field :project %>
<%= form.label :quiz_id, "Quiz" %> <%= form.select :quiz_id, quiz_options(quizzes, candidate.quiz_id), include_blank: (quizzes.size > 1) %>
<%= submit_tag %> <% end %>