<%= form_with(model: program) do |form| %>
  <% if program.errors.any? %>
    <div style="color: red">
      <h2><%= pluralize(program.errors.count, "error") %> prohibited this program from being saved:</h2>

      <ul>
        <% program.errors.each do |error| %>
          <li><%= error.full_message %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <div>
    <%= form.label :name, style: "display: block" %>
    <%= form.text_field :name %>
  </div>

  <div>
    <%= form.label :date, style: "display: block" %>
    <%= form.date_field :date %>
  </div>

  <div>
    <%= form.label :leadingPerson, style: "display: block" %>
    <%= form.text_field :leadingPerson %>
  </div>

  <div>
    <%= form.submit %>
  </div>
<% end %>
