Loading Gravity Form after Ajax Call

I have custom form that is making an ajax call. The ajax handler takes the form input and does a wp_query to find a specific post. It then calls a wp template file that includes the gravity form using gravity_form(‘2’, false,false,false,‘’,true);

The response includes all of the gravity form html and then is added to the page. The gravity form doesn’t validate any of the required fields and doesn’t submit on the frontend.

I’ve included gravity_form_enqueue_scripts( 2, true ); above wp_head() so the gravity form css/js files are loading before the gravity form is included on the page.

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