Trigger jQuery when page has loaded and Conditional logic has finished

I’m trying to write a function in jQuery that runs when the page and conditional logic has finished calculating what fields to hide/show. But I can’t figure out which hook to use, both gform_post_render & gform_page_loaded trigger before the conditional logic has finalised.

Try the gform_post_conditional_logic hook e.g.

gform.initializeOnLoaded( function() { 
    jQuery( document ).on( 'gform_post_conditional_logic', function( formId, fields, isInit ) {
        if ( isInit ) {
            console.log( 'gform_post_conditional_logic running' );
        }
    } );
} );
1 Like

Great thanks Richard that’s what I was looking for

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