        let end = new Date(form.end.value);
        if (start > end) {
          form.end.value = form.start.value;
        }

        let alert = null;
        let alertTime = parseInt(form["alert-time"].value);
        if (!isNaN(alertTime)) {
          let alertUnit = form["alert-unit"].value;
          alert = `${alertTime}${alertUnit}`;
        }

        // concatenate the form values into a query string
        let params = new URLSearchParams(new FormData(form)).toString();

        let url = new UR