> ## Documentation Index
> Fetch the complete documentation index at: https://docs.os.default.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding a scheduler to Pardot forms in Default

> Show a Default booking calendar after a visitor submits a Pardot (Marketing Cloud Account Engagement) form: how the Pixel recognizes Pardot forms, why their submissions go through the Forms SDK, the setup steps, and troubleshooting.

Default can show a booking calendar after a visitor submits a Pardot form on your website, the
product Salesforce now calls Marketing Cloud Account Engagement. The Default Pixel recognizes
Pardot forms, but it does not capture their submissions on its own. Your page reports each
submission to Default with the Forms SDK, and Default then runs the workflow and opens the
calendar the same way it does for any other form.

For the full path from submission to booked meeting, see
[How Default books a meeting from a form submission](/forms/scheduler).

## Pardot forms in Default at a glance

| Question | Answer |
| - | - |
| Does Default recognize Pardot forms? | Yes. Catalog mode finds Pardot forms on your page and can add them. |
| Does the Pixel capture Pardot submissions automatically? | No. The Pixel skips submissions from forms it identifies as Pardot. |
| How does a Pardot submission reach Default? | Your page calls `DefaultPixelSDK.submitForm()` with the answers. |
| Can a Pardot form open the scheduler? | Yes. `submitForm()` runs the workflow and shows the calendar that the **Display Scheduler** node returns. |
| Does it work with a Pardot form inside an iframe from Pardot's domain? | No. Neither the Pixel nor your page's code can read a form inside a cross-origin iframe. The form has to render in your page. |
| Does Default need a Pardot connection? | No. |

## How the Pixel recognizes a Pardot form

The Pixel treats a `<form>` element as a Pardot form when any of these is true:

* Its `action` URL points at `pardot.com` or a subdomain of it, such as `pi.pardot.com`.
* Its `name` or `id` contains `pardot`.
* It contains a field whose `name` contains `pardot`.

Catalog mode uses these rules to label the form as a Pardot form. The Pixel's automatic capture
then skips its submissions, which is why the Forms SDK sends them instead.

A form that posts to Pardot but matches none of these rules is handled as a plain HTML form,
and the Pixel captures it automatically. See
[When the Pixel captures the form as plain HTML](#when-the-pixel-captures-the-form-as-plain-html).

### Check which way the Pixel handles your form

1. Before the Pixel loads, set `window.__defaultPixel__logging__verbose = true` on the page.
2. Open the browser console and show verbose messages.
3. Submit the form with a test email.

| Console message | What it means |
| - | - |
| `[Default.com] [Listener] Skipping as vendor form`, a warning with `vendor: "pardot"` | The Pixel identifies the form as Pardot. Use the Forms SDK steps below. This warning shows even without verbose messages. |
| `[Default.com] [Listener] Found HTML form submission: <form id>` | The Pixel captures the form as plain HTML. No SDK code is needed. |

## Before you start

| Requirement | Where |
| - | - |
| The Pardot form rendered in your page, not in an iframe from another domain | Your site |
| The Pixel and the Forms SDK in the `<head>` of the form's page | See [Set up the Pixel and Forms SDK](/pixel-sdk-setup). |
| The page's domain connected in **Signals** | See [Signals](/forms/signals). |
| An email field on the form | A submission without an email address does not start a workflow. |
| A scheduling event with hosts | See [Events](/events). |
| Someone who can edit the page's JavaScript | Your web team |
| Admin access in Default | Adding forms and mapping fields need admin access. |

## Add a scheduler to a Pardot form

<Steps>
  <Step title="Load the Pixel and the Forms SDK">
    Add both scripts to the `<head>` of the form's page, so they load with the page:

    ```html theme={null}
    <script>
      window.__defaultPixel__ = { key: "your-public-key" };
    </script>
    <script async src="https://pixel.default.com/index.js"></script>
    <script async src="https://pixel.default.com/sdk.js"></script>
    ```

    Copy your real key with **Copy Pixel script** in **Signals**.
  </Step>

  <Step title="Add the form with Catalog forms">
    In **Signals**, open the domain's menu and select **Catalog forms**. Start on the page with
    the Pardot form and select **Open catalog mode**. Select **Add form** on the form, name it,
    and confirm. See [Your forms](/forms/your-forms#add-forms-from-your-site).
  </Step>

  <Step title="Map the fields">
    In **Forms**, open the form and select **Map fields**. Map at least the email field to the
    person's email. Note the field names Default lists. Your code sends answers under these
    names. A mapping belongs to the field name, so it also applies to your other forms with a
    field of that name.
  </Step>

  <Step title="Build the workflow">
    In **Workflows**, add a **Form Submission** trigger and set **Connected Form** to the Pardot
    form. Add a **Display Scheduler** node and choose the **Event**. Add follow-up steps on the
    **Booked** and **Not booked** branches. Select **Publish**, then turn on the
    [deployment switch](/workflows#the-enabled-switch) so the status reads **Live**.
  </Step>

  <Step title="Plan how Pardot keeps receiving the submission">
    The calendar can only open while the visitor stays on the page, so your submit handler has
    to stop the form's normal post with `event.preventDefault()`. That also stops the post to
    Pardot. Default does not forward submissions to Pardot, so decide with your web team how the
    handler sends each submission to Pardot as well, before you write it.
  </Step>

  <Step title="Report the submission to Default with submitForm()">
    In the same submit handler, send the answers to Default. This fragment shows only the
    Default part of the handler:

    ```js theme={null}
    window.addEventListener("load", () => {
      const form = document.getElementById("pardot-demo-form");

      form.addEventListener("submit", async (event) => {
        event.preventDefault(); // also stops the post to Pardot

        const result = await DefaultPixelSDK.submitForm({
          formId: form.id,
          responses: {
            email: form.elements.email.value,
            first_name: form.elements.first_name.value,
          },
        });

        // result.scheduler is set when the workflow returned a calendar,
        // which the SDK opens over the page.

        // REQUIRED: send the same submission to Pardot here.
        // This fragment does not, and Pardot receives nothing without it.
      });
    });
    ```

    `formId` is the form's HTML `id`. The response keys must match the field names from the
    mapping step. See [submitForm](/pixel-sdk-reference#submitform) for every option and the
    result it returns.

    <Warning>
      Do not publish this fragment on its own. It sends the submission to Default only, so
      Pardot would silently stop receiving leads from the form.
    </Warning>
  </Step>

  <Step title="Test in both systems">
    Submit the form with a test email, on a test page of the same domain if you have one.
    Confirm that the calendar opens, that the submission appears on the form in **Forms**, and
    that the same submission arrives in Pardot. Ship the handler to your live page only after all
    3 check out.
  </Step>
</Steps>

To start identifying the visitor before they submit, call `recordFormInteraction()` when they
leave the email field. See
[Build a reliable Forms SDK flow](/pixel-sdk-best-practices#start-pre-enrichment-after-a-valid-email).

## When the Pixel captures the form as plain HTML

If the Pixel does not identify your form as Pardot, it captures the form like any plain HTML
form. You need no SDK code, and you should not add any: calling `submitForm()` for a form the
Pixel already captures sends the submission to Default twice.

Once that form is wired to a **Display Scheduler** workflow, the Pixel holds the submit on the
page so the calendar can open. The browser then does not follow the form's `action` URL, so the
form's own post to Pardot does not happen. Plan another way to get these submissions into
Pardot before you turn the workflow on.

## Route Pardot form leads to the right rep

The **Display Scheduler** node decides who the visitor books with:

* **A team:** create a Team event with a [queue](/queues) as a host. The queue's policy picks
  the rep when the visitor books.
* **The existing owner:** find the lead or contact in Salesforce with **Match Record** before
  the scheduler, turn off **Use event hosts**, and pass the record's owner as the host. Set a
  **Fallback Host** for when the owner is away. Each owner needs their Salesforce User ID mapped
  in [Users](/settings/users).
* **A rule:** a [Rules of Engagement](/rules-of-engagement) node picks the owner, and
  **Latest resolved user** becomes the host.

See [Routing picks the host](/forms/scheduler#step-3-routing-picks-the-host) for every option.

## Troubleshoot Pardot forms

| What you see | What to check |
| - | - |
| Submissions from the Pardot form never reach Default | The Pixel skips Pardot forms. Add the `submitForm()` call from the steps above. |
| `submitForm()` succeeds, but no submission appears on the form in **Forms** | The form is not in Default, or `formId` does not match the form's HTML `id`. Add the form with **Catalog forms** first. |
| Catalog mode shows no badge on the form | The form is probably inside an iframe from Pardot's domain. Render the form in your page instead. Also check for a `data-default-ignore` attribute. |
| The calendar does not open after `submitForm()` | Check that the workflow is published, live, and contains the **Display Scheduler** node, and that `responses` includes the email. |
| Pardot stopped receiving submissions after you added the scheduler | Your submit handler, or the Pixel's hold on a plain-HTML form, stops the post to Pardot. Send the submission to Pardot from your code. |
| Each submission starts the workflow twice | The Pixel already captures the form as plain HTML. Remove the `submitForm()` call. |

Related: [Sales scheduling software from Default](https://www.default.com/product/sales-scheduling-software)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.