From fd33eff8bc0d80844b51e9f73e77009a6d852340 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Wed, 1 Apr 2026 15:56:25 -0500 Subject: [PATCH] Add required attribute to all single contact form fields --- lib/microwaveprop_web/live/submit_live.ex | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/microwaveprop_web/live/submit_live.ex b/lib/microwaveprop_web/live/submit_live.ex index 8e60f771..6be6d6db 100644 --- a/lib/microwaveprop_web/live/submit_live.ex +++ b/lib/microwaveprop_web/live/submit_live.ex @@ -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">
- <.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 />
@@ -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 /> <.input @@ -241,6 +245,7 @@ defmodule MicrowavepropWeb.SubmitLive do type="email" label="Your Email" placeholder="you@example.com" + required />