# gform.initializeOnLoaded is not a Function

**URL:** <https://community.gravityforms.com/t/gform-initializeonloaded-is-not-a-function/15028>\
**Category:** Get Help\
**Tags:** gforminitializeonloaded, php-dom\
**Created:** [April 26, 2023, 5:25pm UTC](https://community.gravityforms.com/t/gform-initializeonloaded-is-not-a-function/15028 "2023-04-26T17:25:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5cb799e4dca9e205](https://avatars.discourse-cdn.com/v4/letter/u/aca169/32.png) [@user5cb799e4dca9e205](https://community.gravityforms.com/u/user5cb799e4dca9e205)\
**Post date:** [April 26, 2023, 5:25pm UTC](https://community.gravityforms.com/t/gform-initializeonloaded-is-not-a-function/15028/1 "2023-04-26T17:25:28Z")

</div>

This presented to me on an Apache - and while the linked request works

> [@gform.initializeOnLoaded is not a Function on Version 2.6.3 \[RESOLVED\]](https://community.gravityforms.com/t/gform-initializeonloaded-is-not-a-function-on-version-2-6-3-resolved/12854):
>
> In one of my client website, I found this error on backend. When I investigated on google there were some answers but those answers were not working with this version. then I personally checked the issues. so the problem is gravityforms/assets/js/dist/vendor-admin.min.js these dist js are loading before plugins/gravityforms/js/gravityforms.min.js so var gform; is undefined for those first enqueued js files and then all these errors starts. why this happenening? I checked the code and found t…

This was caused by the php-dom extension not being enabled.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [May 26, 2023, 5:26pm UTC](https://community.gravityforms.com/t/gform-initializeonloaded-is-not-a-function/15028/2 "2023-05-26T17:26:11Z")

</div>

Closed on May 26, 2023, 5:26pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
