Add required attribute to all single contact form fields
This commit is contained in:
parent
1b5cd19d6d
commit
fd33eff8bc
1 changed files with 8 additions and 3 deletions
|
|
@ -196,21 +196,23 @@ defmodule MicrowavepropWeb.SubmitLive do
|
||||||
~H"""
|
~H"""
|
||||||
<.form for={@form} id="contact-form" phx-change="validate" phx-submit="save" class="space-y-4">
|
<.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">
|
<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
|
<.input
|
||||||
field={@form[:grid1]}
|
field={@form[:grid1]}
|
||||||
type="text"
|
type="text"
|
||||||
label="Grid 1"
|
label="Grid 1"
|
||||||
placeholder="EM12kp"
|
placeholder="EM12kp"
|
||||||
phx-debounce="blur"
|
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
|
<.input
|
||||||
field={@form[:grid2]}
|
field={@form[:grid2]}
|
||||||
type="text"
|
type="text"
|
||||||
label="Grid 2"
|
label="Grid 2"
|
||||||
placeholder="EM00cd"
|
placeholder="EM00cd"
|
||||||
phx-debounce="blur"
|
phx-debounce="blur"
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -225,6 +227,7 @@ defmodule MicrowavepropWeb.SubmitLive do
|
||||||
label="Band"
|
label="Band"
|
||||||
prompt="Select band"
|
prompt="Select band"
|
||||||
options={@band_options}
|
options={@band_options}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
<.input
|
<.input
|
||||||
field={@form[:mode]}
|
field={@form[:mode]}
|
||||||
|
|
@ -232,8 +235,9 @@ defmodule MicrowavepropWeb.SubmitLive do
|
||||||
label="Mode"
|
label="Mode"
|
||||||
prompt="Select mode"
|
prompt="Select mode"
|
||||||
options={@mode_options}
|
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>
|
</div>
|
||||||
|
|
||||||
<.input
|
<.input
|
||||||
|
|
@ -241,6 +245,7 @@ defmodule MicrowavepropWeb.SubmitLive do
|
||||||
type="email"
|
type="email"
|
||||||
label="Your Email"
|
label="Your Email"
|
||||||
placeholder="you@example.com"
|
placeholder="you@example.com"
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="mt-6">
|
<div class="mt-6">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue