% institution = @institution || student.institution %>
<% form_url = student.persisted? ? institution_student_path(institution, student) : institution_students_path(institution) %>
<%= form_with(model: student, url: form_url) do |form| %>
<% if student.errors.any? %>
<%= pluralize(student.errors.count, "error") %> prohibited this student from being saved:
<% student.errors.each do |error| %>
- <%= error.full_message %>
<% end %>
<% end %>
<%= form.label :first_name, style: "display: block" %>
<%= form.text_field :first_name %>
<%= form.label :last_name, style: "display: block" %>
<%= form.text_field :last_name %>
<%= form.label :email, style: "display: block" %>
<%= form.text_field :email %>
<%= form.label :phone_number, style: "display: block" %>
<%= form.text_field :phone_number %>
<%= form.label :place, style: "display: block" %>
<%= form.text_field :place %>
<%= form.label :age, style: "display: block" %>
<%= form.number_field :age %>
<%= form.label :institution_id, style: "display: block" %>
<%= form.text_field :institution_id %>
<%= form.submit %>
<% end %>