Build with HTML - Cancel and Reschedule examples

On this page, Scheduler Quickstart guide: set up Scheduler | Docs, HTML there’s examples to create scheduling pages and examples of the scheduler pages for users. I have them working.

Where can I find an HTML example for the Cancel and Reschedule pages?

Thanks in advance.

Hi @mariense - thanks for posting. Are you looking for the specific configuration for displaying reschedule / cancel components?

Hi Ram, I’m looking for the JavaScript code for those pages. For example, I have this for the Scheduler pages. But can’t find examples for the Cancel and Reschedule pages.

I’ll have a page like so for the Cancel page, and want to have the JavaScript code to make it work:
mywebsitexyz.com/events/scheduler-cancel.php?HFNYC34jsdkljfLYdqfVM2fUMtlCAwGKJFG6Q=

JS code for the Scheduler pages:

    <!-- Configure the Nylas Scheduling Component with a Configuration ID. -->
    <script type="module">
      import { defineCustomElement } from "https://cdn.jsdelivr.net/npm/@nylas/web-elements@latest/dist/cdn/nylas-scheduling/nylas-scheduling.es.js";

      defineCustomElement();

      const nylasScheduling = document.querySelector("nylas-scheduling");
      nylasScheduling.schedulerApiUrl = "https://api.us.nylas.com";

      // Get the Configuration ID from the URL (`?config_id=<NYLAS_SCHEDULER_CONFIGURATION_ID>`).
      const urlParams = new URLSearchParams(window.location.search);

      // If `config_id` doesn't exist, throw a `console.error`.
      if (!urlParams.has("config_id")) {
        console.error(
          "No Scheduler Configuration ID found in the URL. Please provide a Configuration ID."
        );
      }

      // Set the Configuration ID.
      nylasScheduling.configurationId = urlParams.get("config_id");
    </script>