<%= form_with(model: card_rx, class: "contents") do |form| %>
  <% if card_rx.errors.any? %>
    <div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-md mt-3">
      <h2><%= pluralize(card_rx.errors.count, "error") %> prohibited this card_rx from being saved:</h2>

      <ul class="list-disc ml-6">
        <% card_rx.errors.each do |error| %>
          <li><%= error.full_message %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <div class="my-5">
    <%= form.label :help_desk %>
    <%= form.text_field :help_desk, class: ["block shadow-sm rounded-md border px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": card_rx.errors[:help_desk].none?, "border-red-400 focus:outline-red-600": card_rx.errors[:help_desk].any?}] %>
  </div>

  <div class="my-5">
    <%= form.label :customer_service %>
    <%= form.text_field :customer_service, class: ["block shadow-sm rounded-md border px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": card_rx.errors[:customer_service].none?, "border-red-400 focus:outline-red-600": card_rx.errors[:customer_service].any?}] %>
  </div>

  <div class="my-5">
    <%= form.label :web_url %>
    <%= form.text_field :web_url, class: ["block shadow-sm rounded-md border px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": card_rx.errors[:web_url].none?, "border-red-400 focus:outline-red-600": card_rx.errors[:web_url].any?}] %>
  </div>

  <div class="inline">
    <%= form.submit class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
  </div>
<% end %>
