Change Heartbeat API Pulse on Page Load with GF 54

I have found that one can manipulate the beat of the pulse in response to certain events triggered by the user using JavaScript. I’m hoping to use the below example to change the Pulse to 1 beat every 5 seconds (for a maximum of two and half minutes), when a page loads that contains Gravity Form 54.
The code I’m hoping to use(reference from this website: The Heartbeat API: Changing the Pulse):

// 1 beat every 5 seconds for a maximum of two and half minutes
wp.heartbeat.interval( 'fast' );

However, I’m not sure what line(s) of code I would have to first enter to check that the Gravity Form 54 is on that page, or that GF 54 has initialized/loaded. Can someone provide me with a little bit of help?

You can use the following Gravity Forms JS hook to run custom JS code when the form is rendered: gform_post_render - Gravity Forms Documentation

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