11---
2+ import classNames from " classnames" ;
23import * as formContent from " ../content/contact/get-your-plan-form.md" ;
34import " ../styles/loader.css" ;
45import Field from " ./Field.astro" ;
@@ -71,9 +72,9 @@ const enableModalForm = import.meta.env.PUBLIC_ENABLE_MODAL_FORM === "true";
7172 type ={ enableModalForm ? " button" : " submit" }
7273 id =" form-submit-button"
7374 class =" rounded-md
74- min-h-14
75- px-[25px] w-full py-4
76- text-center
75+ min-h-14
76+ px-[25px] w-full py-4
77+ text-center
7778 text-secondary
7879 text-base
7980 font-medium
@@ -113,13 +114,6 @@ const enableModalForm = import.meta.env.PUBLIC_ENABLE_MODAL_FORM === "true";
113114 "#get-your-plan-form-loader",
114115 );
115116
116- submitBtn?.addEventListener("click", () => {
117- const startDateInput = document.getElementById("form-start-date");
118- if (startDateInput) {
119- startDateInput.setAttribute("required", "");
120- }
121- });
122-
123117 const notificationElem = form?.querySelector("#form-notification");
124118
125119 /* Modal part of form elements */
@@ -151,20 +145,10 @@ const enableModalForm = import.meta.env.PUBLIC_ENABLE_MODAL_FORM === "true";
151145 };
152146
153147 const handleCloseModal = () => {
154- const startDateInput = document.getElementById("form-start-date");
155- if (startDateInput) {
156- startDateInput.removeAttribute("required");
157- }
158148 getPlanModal?.close();
159149 };
160150
161151 if (getPlanModal) {
162- getPlanModal.addEventListener("close", () => {
163- const startDateInput = document.getElementById("form-start-date");
164- if (startDateInput) {
165- startDateInput.removeAttribute("required");
166- }
167- });
168152 getPlanModal.addEventListener("click", handleModalSoftDismiss);
169153 submitBtn?.addEventListener("click", handleOpenModal);
170154 }
@@ -200,7 +184,8 @@ const enableModalForm = import.meta.env.PUBLIC_ENABLE_MODAL_FORM === "true";
200184 const consent = formData.get("form-consent");
201185 const companyName = formData.get("form-company");
202186 const mainChallenge = formData.get("form-challenge");
203- const startDate = formData.get("form-start-date");
187+ const expectedStartDate = formData.get("form-start-date");
188+ console.log("startDate", expectedStartDate)
204189
205190 if (!name || !email || !consent) {
206191 return;
@@ -222,7 +207,7 @@ const enableModalForm = import.meta.env.PUBLIC_ENABLE_MODAL_FORM === "true";
222207 hasConsent: consent ? true : false,
223208 companyName: companyName || "",
224209 mainChallenge: mainChallenge || "",
225- startDate: startDate || "",
210+ expectedStartDate: expectedStartDate || "",
226211 }),
227212 },
228213 );
0 commit comments