File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
apps/website/src/components Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,13 @@ const enableModalForm = import.meta.env.PUBLIC_ENABLE_MODAL_FORM === "true";
113113 "#get-your-plan-form-loader",
114114 );
115115
116+ submitBtn?.addEventListener("click", () => {
117+ const startDateInput = document.getElementById("form-start-date");
118+ if (startDateInput) {
119+ startDateInput.setAttribute("required", "");
120+ }
121+ });
122+
116123 const notificationElem = form?.querySelector("#form-notification");
117124
118125 /* Modal part of form elements */
@@ -144,10 +151,20 @@ const enableModalForm = import.meta.env.PUBLIC_ENABLE_MODAL_FORM === "true";
144151 };
145152
146153 const handleCloseModal = () => {
154+ const startDateInput = document.getElementById("form-start-date");
155+ if (startDateInput) {
156+ startDateInput.removeAttribute("required");
157+ }
147158 getPlanModal?.close();
148159 };
149160
150161 if (getPlanModal) {
162+ getPlanModal.addEventListener("close", () => {
163+ const startDateInput = document.getElementById("form-start-date");
164+ if (startDateInput) {
165+ startDateInput.removeAttribute("required");
166+ }
167+ });
151168 getPlanModal.addEventListener("click", handleModalSoftDismiss);
152169 submitBtn?.addEventListener("click", handleOpenModal);
153170 }
You can’t perform that action at this time.
0 commit comments