# Form Submit JavaScript Event Not Firing

**URL:** <https://community.gravityforms.com/t/form-submit-javascript-event-not-firing/18784>\
**Category:** Get Help\
**Tags:** javascript, submit, submit\_form, gform-submission-pre\_submission\
**Created:** [January 17, 2025, 3:49pm UTC](https://community.gravityforms.com/t/form-submit-javascript-event-not-firing/18784 "2025-01-17T15:49:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![richardw8k](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/richardw8k/32/2354_2.png) [@richardw8k](https://community.gravityforms.com/u/richardw8k)\
**Post date:** [January 17, 2025, 3:58pm UTC](https://community.gravityforms.com/t/form-submit-javascript-event-not-firing/18784/2 "2025-01-17T15:58:28Z")

</div>

The product team implemented a JS-based form submission handler in 2.9 to ensure that all submissions, regardless of the embed/submission method (default postback, legacy iframe-based Ajax, or new experimental real Ajax), are processed in a consistent way, and that add-ons can integrate into the process in a standardised way without writing their own full submission handlers.

It also handles blocking duplicate submissions, adding the honeypot version hash to the submission, and triggering integrations like reCAPTCHA.

The recommended way to perform custom tasks between the button being clicked and the request being posted to the server is by using the new gform/submission/pre\_submission filter:

> **[gform/submission/pre\_submission](https://docs.gravityforms.com/gform-submission-pre_submission/)**
>
> The gform/submission/pre\_submission filter should be used to perform custom actions between a form button (e.g. submit, next, previous) being clicked and the request being posted to the server.

Another usage example can be found here:

> [@Manual FB Conversion Tracking](https://community.gravityforms.com/t/manual-fb-conversion-tracking/18739/3):
>
> Hi Utveck, The following code might help register a user as a lead upon clicking the submit button. document.addEventListener('gform/postRender', (event) =\> { gform.utils.addAsyncFilter('gform/submission/pre\_submission', async (data) =\> { const specificFormId = 'YOUR\_FORM\_ID'; // Your GF form ID if (data.formId === specificFormId && data.submissionType === gform.submission.SUBMISSION\_TYPE\_SUBMIT) { fbq('track', 'Lead'); } return data; }); });…

---

_[View the full topic](https://community.gravityforms.com/t/form-submit-javascript-event-not-firing/18784)._
