Gravity Forms not visible and conditional logic not working

I’m experiencing two related issues with Gravity Forms on my website:

  1. Initially, the forms were completely invisible on the frontend of my site.
  2. After implementing CSS fixes to make the forms visible, the conditional logic still doesn’t work.

When I check the browser console, I see this error: “Uncaught TypeError: Cannot read properties of undefined (reading ‘call’) in scripts-theme.min.js line 1”

The error seems to occur when the page loads, preventing the conditional logic from initializing properly.

Steps I’ve already taken:

  • Cleared browser cache and website cache
  • Implemented CSS fixes to make the forms visible
  • Tried to repair the scripts with custom JavaScript
  • Checked for conflicts with other plugins
  • Followed the troubleshooting steps in your documentation

System Information:

  • WordPress Version: 6.7.2
  • Gravity Forms Version: 2.9.6.1
  • Theme: Thrive Theme
  • Active Plugins: Add-On Chained Selects di Gravity Forms,
    Add-On Webhooks di Add-On, Advanced Custom Fields PRO, Photo Gallery, Thrive Apprentice, Thrive Architect, Thrive Leads, Thrive Product Manager, Widgets for Google Reviews, WP Webhooks Pro
  • Browser: chrome

**URL where the issue can be seen:**testt - Barba Viaggi
I would greatly appreciate your help in resolving this issue, as we need the forms with conditional logic for our business operations.

Thank you!

2 Likes

Hi Elisabetta,

You can refer to the article below to begin troubleshooting the form. In summary, disable all third-party plugins and switch back to the “Twenty Twenty-Four” theme to see if the issue persists. If not, enable your plugins one by one to identify the cause.

Otherwise, open a support ticket here:

1 Like

same here

1 Like

My site also started having this issue at the same time. I’ve disabled all plugins and reverted to 2024 theme, but there is still a JS error on /wp-content/plugins/gravityforms/assets/js/dist/scripts-theme.min.js:25798 - Uncaught TypeError: Cannot read properties of undefined (reading ‘call’)

1 Like

Also seeing this behavior on at least one client site. Going to downgrade the plugin to see if that helps for the time being.

1 Like

I have the same problem. Have you resolve?

In my case the problem was caused by the latest version of Elementor, which introduces a system-wide “lazy load” setting. By disabling this feature, all forms using conditional logic reappear.

I’m sorry to say that unfortunately the issue hasn’t been resolved. Do you have any ideas about it?

One of our forms wasn’t functioning properly (the phone mask wasn’t appearing for example), and the form itself wasn’t submitting properly. I checked the browser console and I was having the same error described above. I tried a few things, but the thing that worked for me was changing the “Anti-spam honeypot” from “Do not create an entry” to “Create an entry and mark it as spam”. I cleared the cache and the mask started working again, and the form itself submitted properly.

1 Like

Also experiencing forms with conditional logic being hidden on page load with the same error on multiple sites. This has only happened in the last couple days, and the last time some of our clients were getting submissions was April 9. So I’m pretty sure there’s something up with the latest version that was released on April 8…

1 Like

Exact same issue over here, client using Genesis “Navigation Pro” theme.

1 Like

Same issue here.

Works fine when logged in, form isn’t visible for visitors. Error message is:
“Uncaught TypeError: Cannot read properties of undefined (reading ‘call’)”

1 Like

I also have the same JS errors since updating to 2.9.6.1

1 Like

+1 on this issue.

Logic based forms are stuck on display:none; and only JS error is the same “scripts-theme.min.js”

Not using Elementor or other theme/plugins mentioned. Just recently started happening on a form with Logic that I’ve been using for years, so recent update causing the issue sounds likely.

Could it be caching related? My logic based forms work just fine when logged in and the hash version of that file are different. Plus, after I disabled logic on a different form, it took about 12 hrs for it to work properly logged out.

wpengine + cloudflare infrastructure if it helps.

1 Like

After I used Cluade.ai:
After struggling with Gravity Forms conditional logic fields not displaying properly when embedded in Elementor, I found a solution that worked consistently.

The Problem

Forms with conditional logic appeared correctly in preview mode and when logged in as admin, but remained invisible for regular visitors. The browser console showed this error:

Uncaught TypeError: Cannot read properties of undefined (reading 'triggerPostRenderEvents')

This occurred because the triggerPostRenderEvents function was undefined, preventing conditional fields from being displayed properly.

The Solution

I created a JavaScript fix using WP Code plugin that manually implements the missing functionality. Here’s the code that solved the issue:

jQuery(document).ready(function($) {
    // Wait for all scripts to load
    setTimeout(function() {
        // Check if there are Gravity Forms on the page
        if ($('.gform_wrapper').length > 0) {
            // Create the missing function manually
            if (typeof gform !== 'undefined') {
                if (typeof gform.core === 'undefined') {
                    gform.core = {};
                }
                
                if (typeof gform.core.triggerPostRenderEvents === 'undefined') {
                    gform.core.triggerPostRenderEvents = function(formId, currentPage) {
                        console.log('Trigger manual post render for form ' + formId);
                        $(document).trigger('gform_post_render', [formId, currentPage]);
                        
                        // Manually remove display:none from elements with conditional logic
                        $('#gform_' + formId + ' .gfield_visibility_visible').css('display', 'block');
                        
                        // Force layout recalculation
                        $(window).trigger('resize');
                    };
                }
                
                // Apply to existing forms
                $('.gform_wrapper').each(function() {
                    var formId = $(this).attr('id').replace('gform_wrapper_', '');
                    if (formId) {
                        // Manually remove display:none
                        $('#gform_' + formId + ' .gfield_visibility_visible').css('display', 'block');
                        
                        // Trigger post-render events
                        if (typeof gform.core.triggerPostRenderEvents === 'function') {
                            gform.core.triggerPostRenderEvents(formId, 1);
                        } else {
                            $(document).trigger('gform_post_render', [formId, 1]);
                        }
                    }
                });
            }
        }
    }, 1000); // Wait 1 second to ensure all scripts are loaded
});

We’re on wpengine + cloudflare too.

1 Like

Same issue - also on WP Engine and GES. Have not had this issue before with this theme/plugin combination so I suspect its some regression in Gravity Forms proper.

1 Like

Adding another data point to the pile as I have a client site that is also seeing the Uncaught TypeError: Cannot read properties of undefined (reading ‘call’) in scripts-theme.min.js line 1 error. They’re on SiteGround with a block theme, the form appears in the block editor on the backend, but is blank on the front-end.

WP: 6.8
PHP: 8.2.28

I know downgrading is not recommended, but I attempted installing previous versions (2.9.7, and 2.9.6.1) until I found one that worked. In this case, Version 2.9.5 is the latest version where forms with conditional logic function as expected.

We are having the exact same problems the past few days. So it sounds like it’s a problem in the recent updates. The only thing I’ll add is that it’s sporadic, and some of our teams see the problem, while others do not. We have not been able to identify what the situation is. We’ve cross-referenced browsers, platforms, etc., and some people see it, while others do not. I’m hoping we can get a fix soon.

Experiencing the “Cannot read properties of undefined (reading ‘call’)” error as well in all forms regardless of whether or not conditional logic is being applied. The error does not occur when logged in as an admin user.

@Stylmark That suggests caching or optimization is causing the issue, those features generally don’t run for logged-in users.

Most likely yes, but downgrading to 2.9.5 or lower as mentioned earlier fixes the issue so it appears to be something in a later version of the plugin that is conflicting with the caching.