# Multi step form event listener

**URL:** <https://community.hubspot.com/t/multi-step-form-event-listener/116217>\
**Category:** APIs & Integrations\
**Tags:** forms\
**Created:** [September 12, 2024, 10:03am UTC](https://community.hubspot.com/t/multi-step-form-event-listener/116217 "2024-09-12T10:03:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RThorp](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@RThorp](https://community.hubspot.com/u/RThorp)\
**Post date:** [September 12, 2024, 10:03am UTC](https://community.hubspot.com/t/multi-step-form-event-listener/116217/1 "2024-09-12T10:03:50Z")

</div>

Is it possible to register an event listener on the window for when a multi step form is submitted?

In normal forms, we can listen for the ‘message’ event as per the [docs here](https://legacydocs.hubspot.com/global-form-events), but this doesn’t seem to be firing on the multi step forms.

Thanks!

Rich

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [September 12, 2024, 2:44pm UTC](https://community.hubspot.com/t/multi-step-form-event-listener/116217/2 "2024-09-12T14:44:12Z")

</div>

Hi @RThorp

```lia-code-sample
hbspt.forms.create({ portalId: "your_portal_id", formId: "your_form_id", onFormSubmit: function($form) {
 // call event here
 console.log("Form submitted!"); }
 });

```

I hope this will help you out. Please mark it as **Solution Accepted and upvote** to help another Community member.  
Thanks!

---

<div class="post-metadata">

**Author:** ![RThorp](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@RThorp](https://community.hubspot.com/u/RThorp)\
**Post date:** [September 12, 2024, 3:01pm UTC](https://community.hubspot.com/t/multi-step-form-event-listener/116217/3 "2024-09-12T15:01:48Z")

</div>

Hi Gaurav,

Thanks for your reply.

Unfortunately, the code you sent is the method used to embed a normal (not a multi step form) on the page.

So far as I can tell, you don’t use the hs.forms.create method to embed a multi step form. See below snippet for multi step form embed code:

```lia-code-sample
<script src="https://js.hsforms.net/forms/embed/1864311.js" defer></script>
<div class="hs-form-frame" data-region="na1" data-form-id=" ****form-id****" data-portal-id=" ****portal-id****"></div>

```

Thanks,

Rich

---

<div class="post-metadata">

**Author:** ![RYan86](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@RYan86](https://community.hubspot.com/u/RYan86)\
**Post date:** [November 4, 2024, 3:10am UTC](https://community.hubspot.com/t/multi-step-form-event-listener/116217/4 "2024-11-04T03:10:04Z")

</div>

I also encountered the same problem, I would like to ask if you have found a solution

---

<div class="post-metadata">

**Author:** ![RThorp](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@RThorp](https://community.hubspot.com/u/RThorp)\
**Post date:** [November 4, 2024, 9:00am UTC](https://community.hubspot.com/t/multi-step-form-event-listener/116217/5 "2024-11-04T09:00:12Z")

</div>

Unfortunately not - hopefully something will be added as they move out of beta.
