Archived topic
Gravity Forms AJAX doesn't work when hooked via Elements
3 replies · Started by Hardik on October 7, 2020
Hello
I've deployed Gravity Forms using generate_after_do_template_part Block Hook on all blog posts. I've enabled ajax on the Gravity Forms but after submission of an entry, nothing happens in frontend but I do receive the data at backend. I also have ajax enabled on other forms that I've directly inserted on a page which works as intended.
What could be the issue with hooking elements here?
Thanks!
Hi there,
It looks like it's requiring jQuery, but not adding it to the page.
Try this function:
add_action( 'wp_enqueue_scripts', function() {
wp_enqueue_script( 'jquery' );
} );
Thank you! It's working now.
You're welcome :)