<%= form_for(@message) do |f| %>
  <% if @message.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@message.errors.count, "error") %> prohibited this message from being saved:</h2>

      <ul>
      <% @message.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :message %><br />
    <%= f.text_field :message %>
  </div>
  <div class="field">
    <%= f.label :senderID %><br />
    <%= f.number_field :senderID %>
  </div>
  <div class="field">
    <%= f.label :recipientID %><br />
    <%= f.number_field :recipientID %>
  </div>
  <div class="field">
    <%= f.label :date %><br />
    <%= f.datetime_select :date %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
