feat(15): displaying existing answers in form step

This commit is contained in:
efim
2023-07-15 04:36:28 +00:00
parent bf33858e41
commit 5f260455cb
4 changed files with 27 additions and 3 deletions

View File

@@ -105,6 +105,7 @@
<label for="name" class="pt-3 text-sm md:pt-5 md:pb-2 text-marine-blue">Name</label>
<input
id="name"
th:value="${formData.step1.name}"
name="name"
type="text"
placeholder="e.g. Stephen King"
@@ -115,6 +116,7 @@
>
<input
id="email"
th:value="${formData.step1.email}"
name="email"
type="email"
placeholder="e.g. stephenking@lorem.com"
@@ -125,6 +127,7 @@
>
<input
id="phone"
th:value="${formData.step1.phone}"
name="phone"
type="tel"
placeholder="e.g. +1 234 567 890"

View File

@@ -119,6 +119,7 @@
name="plan-type"
value="Arcade"
class="hidden peer"
th:checked="${formData.step2.planType.toString()} == 'Acrade'"
checked
/>
<div
@@ -135,6 +136,7 @@
name="plan-type"
value="Advanced"
class="hidden peer"
th:checked="${formData.step2.planType.toString()} == 'Advanced'"
/>
<div
class="absolute inset-y-0 inset-x-0 rounded-lg border border-cool-gray peer-checked:border-purplish-blue peer-checked:bg-magnolia"
@@ -150,6 +152,7 @@
name="plan-type"
value="Pro"
class="hidden peer"
th:checked="${formData.step2.planType.toString()} == 'Pro'"
/>
<div
class="absolute inset-y-0 inset-x-0 rounded-lg border border-cool-gray peer-checked:border-purplish-blue peer-checked:bg-magnolia"
@@ -169,6 +172,7 @@
name="isPackageYearly"
role="switch"
id="packageDuration"
th:checked="${formData.step2.isYearly}"
/>
<span class="row-start-1 text-marine-blue peer-checked:text-cool-gray">Monthly</span>
<span class="row-start-1 text-cool-gray peer-checked:text-marine-blue">Yearly</span>

View File

@@ -117,6 +117,7 @@
value="OnlineService"
name="addon-services"
class="my-7 w-6 h-6 peer"
th:checked="${formData.step3.containsAddon('OnlineService')}"
/>
<div
class="absolute inset-y-0 inset-x-0 rounded-lg border border-cool-gray peer-checked:border-purplish-blue peer-checked:bg-magnolia/50"
@@ -140,6 +141,7 @@
name="addon-services"
value="LargerStorage"
class="my-7 w-6 h-6 peer"
th:checked="${formData.step3.containsAddon('LargerStorage')}"
/>
<div
class="absolute inset-y-0 inset-x-0 rounded-lg border border-cool-gray peer-checked:border-purplish-blue peer-checked:bg-magnolia/50"
@@ -163,6 +165,7 @@
name="addon-services"
value="CustomProfile"
class="my-7 w-6 h-6 peer"
th:checked="${formData.step3.containsAddon('CustomProfile')}"
/>
<div
class="absolute inset-y-0 inset-x-0 rounded-lg border border-cool-gray peer-checked:border-purplish-blue peer-checked:bg-magnolia/50"