Loading form using Barba/Swup?

Hi all. I know this question has been asked before, but I’ve tried multiple solutions and none of them seem to work. We’re running a Wordpress site and using Swup to handle our page transitions. Because the page is not hard reloading, we’re not able to properly initialize the javascript/CSS for the form. The closest I’ve been able to get is using this Gist - This allows your gravity forms to load via ajax to ensure they work correctly with page transitions that have no window/document.onload · GitHub - which will load the form and its styles properly, but then the submit button does nothing when clicked. Can anyone please help me with this issue? It’s a problem we’re running into with all of our sites, and we’re going to have to find a different forms solution if we can’t get it working.

I don’t have any experience using Barba/Swup, but the following tutorial provides valid code to load forms via ajax that has been tested with Gravity Forms 2.5.x. It’s working fine for me in a default WordPress installation.

I hope that helps!

Thanks! So this seems to work fine when loading a form with AJAX submission set to false, which is fine for us. However, the form submission takes us to a page that just says “Thanks for contacting us! We will get in touch with you shortly.” and doesn’t bring in the site header or any other way to navigate back. Any thoughts on how I can hook into the form submission function and style this success page?

Just FYI, it does not work with AJAX submission set to true. The form loads, but clicking submit does nothing.

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