Add required attribute to all single contact form fields

This commit is contained in:
Graham McIntire 2026-04-01 15:56:25 -05:00
parent 1b5cd19d6d
commit fd33eff8bc
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -196,21 +196,23 @@ defmodule MicrowavepropWeb.SubmitLive do
~H"""
<.form for={@form} id="contact-form" phx-change="validate" phx-submit="save" class="space-y-4">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<.input field={@form[:station1]} type="text" label="Station 1" placeholder="W5XD" />
<.input field={@form[:station1]} type="text" label="Station 1" placeholder="W5XD" required />
<.input
field={@form[:grid1]}
type="text"
label="Grid 1"
placeholder="EM12kp"
phx-debounce="blur"
required
/>
<.input field={@form[:station2]} type="text" label="Station 2" placeholder="K5TR" />
<.input field={@form[:station2]} type="text" label="Station 2" placeholder="K5TR" required />
<.input
field={@form[:grid2]}
type="text"
label="Grid 2"
placeholder="EM00cd"
phx-debounce="blur"
required
/>
</div>
@ -225,6 +227,7 @@ defmodule MicrowavepropWeb.SubmitLive do
label="Band"
prompt="Select band"
options={@band_options}
required
/>
<.input
field={@form[:mode]}
@ -232,8 +235,9 @@ defmodule MicrowavepropWeb.SubmitLive do
label="Mode"
prompt="Select mode"
options={@mode_options}
required
/>
<.input field={@form[:qso_timestamp]} type="datetime-local" label="Timestamp (UTC)" />
<.input field={@form[:qso_timestamp]} type="datetime-local" label="Timestamp (UTC)" required />
</div>
<.input
@ -241,6 +245,7 @@ defmodule MicrowavepropWeb.SubmitLive do
type="email"
label="Your Email"
placeholder="you@example.com"
required
/>
<div class="mt-6">