No JavaScript Files Loading And Unable To Create/Save Forms

Hi,

We have tried to create a form in GF. We have existing forms and they can viewed but not edited.

When we open wp-admin/admin.php?page=gf_new_form > select blank form > add form title > click create blank form we get the normal screen. Firstly we were unable to scroll down on the sidebar on the right to see the available input types. We did resolve this by putting this inside the functions.php:

add_action('admin_head', 'my_custom_fonts');

function my_custom_fonts() {
  echo '<style>
    .gforms_edit_form .editor-sidebar {
	overflow:auto;
    } 
  </style>';
}

But this only resolved the no scrolling issue. There is far more at play here. We enabled and disabled the conflict mode and cleared the cache but nothing.

When we looked at console in dev tools we see a bunch of JS files not loading:

Uncaught TypeError: gform.initializeOnLoaded is not a function
at gravityforms.min.js?ver=2.8.13:1:37018
form_admin.min.js?ver=2.8.13:1 Uncaught TypeError: gform.initializeOnLoaded is not a function
at form_admin.min.js?ver=2.8.13:1:32460
admin.php?page=gf_edit_forms&id=6:3790 Uncaught TypeError: gform.addAction is not a function
at admin.php?page=gf_edit_forms&id=6:3790:86
layout_editor.min.js?ver=2.8.13:1 Uncaught TypeError: gform.addAction is not a function
at initLayoutEditor (layout_editor.min.js?ver=2.8.13:1:11984)
at layout_editor.min.js?ver=2.8.13:1:13169
form_editor.min.js?ver=2.8.13:1 Uncaught TypeError: gform.addFilter is not a function
at form_editor.min.js?ver=2.8.13:1:101865
admin.php?page=gf_edit_forms&id=6:5567 Uncaught TypeError: gform.addFilter is not a function
at admin.php?page=gf_edit_forms&id=6:5567:10
load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,jquery-ui-core,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.5.3:2 jQuery.Deferred exception: gform.applyFilters is not a function TypeError: gform.applyFilters is not a function

wp-content/plugins/gravityforms/js/form_editor.min.js?ver=2.8.13:1:48827)

wp-admin/load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,jquery-ui-core,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.5.3:2:27330)

wp-admin/load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,jquery-ui-core,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.5.3:2:27028)

Do you have any suggestions?

You do not need to add anything to the functions.php to make Gravity Forms work. It sounds like you have a conflict with other software on the site, interfering with your form admin pages. Have you checked for conflicts already, using these steps?

Hi Chris,

Thanks for coming back to me.

The adding the above to the functions.php was just to test if it would rectify that one issue. We are still experiencing the JS files not loading in the https://xxxx.wpengine.com/wp-admin/admin.php?page=gf_edit_forms page

These are the errors in the console:

not available
Expression
not available
Expression
not available
Expression
not available

load-scripts.php?c=1…p-hooks&ver=6.5.3:5 JQMIGRATE: Migrate is installed, version 3.4.1
gravityforms.min.js?ver=2.8.13:1 Uncaught
TypeError: gform.initializeOnLoaded is not a function
at gravityforms.min.js?ver=2.8.13:1:37018
form_admin.min.js?ver=2.8.13:1 Uncaught
TypeError: gform.initializeOnLoaded is not a function
at form_admin.min.js?ver=2.8.13:1:32460

We have tried deactivating all plugins. Turned off caching for the page and nothing has worked.

I would like to remove the plugin entirely and reinstall fresh. But before that, we have a brand new license with three sites, the pro license. Can we test this on a fresh install on WPEngine and start adding the plugins to establish what one is causing the issue? Once/if we establish what plugin is causing this we can remove this license and delete this instance of WP and have the three licenses available?

I have resolved this.

I changed themes to a generic one (2025) and GF worked right away. This was to do with a call to a custom GF php file

require_once(‘functions/custom/gravity-forms.php’);

This had some code to force GF to initialise scripts in the footer and ensure the DOM is loaded before scripts are executed.

Yet to resolve why the dom is not loaded, but the issue is resolved as far as GF is now working as expected.

My advice is is you’re getting this happening navigate to the theme you’re using and put an underscore at the begining of the functions.php and test.

Issue GF